Hi all,
I am trying to use history.back() to get back to my previous page but the page comes up with empty form fields.
The page I'm trying to get to has a form with several text input fields. I have a selection box that determines the value of another text field.
When a user selects and option from the selection box I pull data from a sql database and dynamically update the value a selection box.
The rest of the text fields are filled in normally by the user.
Why are the fields blank when I go back? Only one field is dynamically set so I kinda figured it'd be blank.
Will I have to reload the field values myself?
Can I tell how the page was loaded without setting a cookie or session variable? ie. something like document.referrer?
Should I use something like the <body onload="somefunction()"> to check a cookie or session variable?
I'm a little confused on the best way to proceed. Any suggestions will be appreciated. Thanks all.
I am trying to use history.back() to get back to my previous page but the page comes up with empty form fields.
The page I'm trying to get to has a form with several text input fields. I have a selection box that determines the value of another text field.
When a user selects and option from the selection box I pull data from a sql database and dynamically update the value a selection box.
The rest of the text fields are filled in normally by the user.
Why are the fields blank when I go back? Only one field is dynamically set so I kinda figured it'd be blank.
Will I have to reload the field values myself?
Can I tell how the page was loaded without setting a cookie or session variable? ie. something like document.referrer?
Should I use something like the <body onload="somefunction()"> to check a cookie or session variable?
I'm a little confused on the best way to proceed. Any suggestions will be appreciated. Thanks all.