Closed Thread Icon

Preserved Topic: redirect after form submission? Pages that link to <a href="https://ozoneasylum.com/backlink?for=18536" title="Pages that link to Preserved Topic: redirect after form submission?" rel="nofollow" >Preserved Topic: redirect after form submission?\

 
Author Thread
CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 12-17-2001 17:14

I am using BigNoseBird's email form for a website. After the user submits the info and then is redirected to the "Thank you" ONLY, I would like for them to be redirected to the last page that they visited.

Lets say they were on the "Products" page and then to the support page and filling in the form, they are then given the "Thank You" page. Is is possible to send them back to the "Products" page?

Thanks in advance.

Later,
C:\

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-17-2001 17:40

hmmm... im not familiar with this code, but a solution would be using javascripts history.

history.back(2);



Allewyn
Maniac (V) Mad Scientist

From: Solitary confinement
Insane since: Feb 2001

posted posted 12-17-2001 18:05

Why wouldn't you be able to use the same redirect method used on the products page, on the thank you page. Just make the url point to products.html or whatever you called it (from thank you page), and set the timer?



[This message has been edited by Allewyn (edited 12-17-2001).]

Sash
Paranoid (IV) Inmate

From: Canada, Toronto
Insane since: May 2000

posted posted 12-17-2001 18:25

You can add a hidden field in your form with the name of the page that you want to go back to. Just an idea.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-17-2001 20:06

BNBFORM has one configuration parameter called "ok_url" which holds the URL to jump to after sucessfully completing the form. So, you should add this to your form:

<INPUT TYPE="HIDDEN" NAME="ok_url" VALUE="http://www.example.com/products/index.html">


CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 12-17-2001 20:28

Max, I know about the "ok_url" But this is being used for the "Thank You" page. I still want to use the "Thank You" page, but only after they see this, then they are redirected to the page they were viewing before they entered the "Support" page, wether it be the "Products", "Contact Us" "Home" or whatever. I want to get them back to that page.
I don't want to pre-define the page that they are brought back to.

I want to have the "Thank You" page do something like:

Thank You! Your submission has been sent. Please wait while we take you back to the page that you were previously viewing.

Something like what happens here when you submit something.

Later,
C:\

[This message has been edited by CPrompt (edited 12-17-2001).]

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-17-2001 20:35

Do you have any sort of scripting availible on the original page? otherwise you could probably hack the script to make the HTTP_REFFERER environment variable the return page.

Failing either of those. What I've done to kinda get around the whole form submission thing is when someone submits a form you can use JS to pop aa window which then gets passed the form info and submits the form (or you can point to the cgi directly and just put all the data in the query string) either way the user doesn't leave the orginal page at all.



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 12-17-2001 20:38

Add the following to your "thank you" page...

<BODY ONLOAD="setTimeout('history.go(-2);', 5000);">

BTW It will go back two pages after 5 seconds...


CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 12-17-2001 21:35

Hey Bit. Thanks for the info but that might be over my head. I think that Max has the answer that I am looking for. I am going to test it tonight.

Thanks for all the help.

Later,
C:\

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 12-18-2001 14:23

Yep, that's what I needed Mr. Max! Thank you again!!



Later,
C:\

« BackwardsOnwards »

Show Forum Drop Down Menu