...

View Full Version : How do I control redirects from <form> code?



Fred
12-05-2002, 11:31 PM
I would like to use the following form code on my homepage for visitors to subscribe to my mailing list, but I cannot figure out how to get the redirect tag within, to either 1) default back to the homepage, or 2) redirect to a new browser window.

Here's the form code I am working with:

<form name="form1" method="post" action="http://www.cyberserious.com/cgi-bin/auto_followup.pl">
<font face="Verdana, Arial, Helvetica, sans-serif"><b><font face="Arial, Helvetica, sans-serif" color="#FF0000">Detective
Tips!</font><font face="Arial, Helvetica, sans-serif"> <br>
Receive FREE Valuable Tips<br>
on How to do Your Own<br>
Investigative Work Online!</font></b></font><br>
<input type="hidden" name="product" value="netdet">
<input type="hidden" name="remind" value="ON">
<input type="hidden" name="newsletter" value="ON">
<input type="hidden" name="redirect" value="http://www.cyberserious.com/thankyou.htm">
<br>
<b><font face="Arial, Helvetica, sans-serif">Your Name:</font></b><br>
<input name="name" size="15">
<font face="Arial, Helvetica, sans-serif"><b><br>
Your Email:</b></font> <br>
<input name="email" size="15">
<br>
<font size="2">
<input type="submit" value="Submit" style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt" name="submit">
</font> <br>
</form>

This code as it is here redirects to thankyou.htm

I tried changing the line:

<input type="hidden" name="redirect" value="http://www.cyberserious.com/thankyou.htm">

to

<input type="hidden" name="redirect" value="http://www.cyberserious.com"> but it still redirects to thankyou.htm.

I also tried this:

<input type="hidden" name="redirect" value="http://www.cyberserious.com/thankyou.htm" target="new">

to see if that would redirect thankyou.htm to a new browser window, but the target="new" apparently doesn't work with redirects.

Fred

MrDoubtFire
12-06-2002, 12:07 AM
1) default back to the homepage, or 2) redirect to a new browser window.

To 1)
<input type="hidden" name="return_link_title" value="Back to Main Page" >
<input type="hidden" name="return_link_url" value="" >


I don't think 2) is possible.

MrDoubtFire

Fred
12-06-2002, 12:45 AM
Sorry, but it didn't work.

I think the problem might be that I cannot control the redirect from the form code on the page. The redirect to thankyou.htm is set up in the script. The problem is I really need to be able to customize this function, because I want to use this same form both in a popup window and on my homepage, but I don't both of them redirecting to the same page.

Maybe I am attempting the impossible
Fred

Nightfire
12-06-2002, 01:59 AM
If you don't have access to the perl script, then just create a javascript and/or metatag redirect code to work straight away on the thankyou page

<script>
document.location='http://yoursite.com';
</script>

Fred
12-06-2002, 02:42 AM
I do have access to the pl script. It's AutoFollowup autoresponder script. There is a block provided for the redirect link, where I have /thankyou.htm. Maybe if I try removing and leaving it blank, that might give me more custom control of redirects from the HTML code.
Thanks,
Fred

Fred
12-06-2002, 06:58 PM
The problem is now fixed. I emailed Jason Silver of crookedbush.com, the author of Auto Followup and he gave me a fix for it.
Fred



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum