English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i have a form on my website and when the user clicks submit it will send and take them back to my homepage but what i would like to do is take them back to the page they were on before they got to the form does anyone know the code for this please

2006-11-13 08:12:50 · 3 answers · asked by themanwithtwoarms 3 in Computers & Internet Programming & Design

3 answers

GO BACK
this is a link but the javascript will work in your form code.

2006-11-13 09:35:55 · answer #1 · answered by playfoolcom 1 · 0 0

Depending on what you're using to handle the form. I will assume that you're using a server side script. Then you should use the "Referrer" (obtained from the server variable) as the value for the attribute "action" of the "form" tag. Anyway, if you're processing the form, you will have to include a form processor on all the pages that can be referrers of the form, i.e. all the pages that link to the form..

2006-11-13 20:27:44 · answer #2 · answered by Diegosolo 2 · 0 0

The code that I have is in JavaScript and is:-
history.go(-1);

2006-11-13 16:32:49 · answer #3 · answered by AnalProgrammer 7 · 0 0

fedest.com, questions and answers