PDA

View Full Version : History - back


bostjank
07-12-2002, 02:55 PM
Hi!

Sometimes I use "history.back();" to give the visitor the option of returning to previosu page and correct information he/she entered in a form.
But there is a problem - sometimes everything works ok, but sometimes it also happens that all the fields are cleared.
Can you suggest a method of returning to a page with form and not clearing the data?

Thanks, Bostjan

Soldier Bob
07-12-2002, 05:13 PM
The only fail safe way to keep their data is to have your form submit to a CGI everytime they submit.

Of course you can have javascript alerts that do not allow submission until the data is correct. That way only correct data is accepted and allowed to be modified.

The back() feature from what I understand is controlled by the browser. As long as the person tryly does a back() function the data should be there. But if the page is at all reloaded as a result of the back() function then the data can be lost.

-S. Bob