"Randy Webb" <Hi************@aol.com> wrote in message
news:U-********************@comcast.com...
For instance when I create a form using HTML instead of programmatically
via the DOM and set a form field value in script, if I leave the page and
then return, the browser preserves that form field and its value as it
was last left. This is the same exact behavior I need when I
programmatically build the form, instead of it being destroyed. Is this
possible?
That depends, directly, on how you are creating the form. If the form
requires user interaction to be created, then no, you aren't going to
*easily* be able to do what you want. You could try setting a cookie but
you would run out of space in a hurry if your form is very large though.
Thanks for the tips. The form I am creating dynamically is being done in
the document's main OnLoad event, so it does not require user interaction to
be created. However, it still does not persist if you move off the page and
come back with the back button. It will recreate it just fine, but then I
lose the values that I had purposely stored in the form field. Any way to
work around this and make the form persist? Cookies are not an option.
As an alternative to storing this value in a form field - is there any other
nook or cranny within the browser I could tuck a value into that would
persist if a user moved away and then came back with the Back button? Maybe
adding something to a style / stylesheet or sometihng? I would not want to
value to persist if the page is recalled via a link later - just need it to
persist and be present in the even tthe back button is used. I know this
sounds like a cookie could help but as mentioned cookies cannot be used at
all in this solution.
Thanks!
--- Mike