Page 1 of 1
IE - Refresh issue
Posted: Wed Oct 26, 2005 9:19 pm
by facets
Hi All,
When I refresh a page in IE I loose form data.
Is there any way to keep it?
I can supply more detail if necessary.
Firefox doesn't behave this way.
Cheers, Will.
Posted: Wed Oct 26, 2005 9:31 pm
by feyd
you'd have to resubmit the posting information, so a hidden set of form data could do it, however hitting refresh in the browser wouldn't activate such page logic.
Posted: Wed Oct 26, 2005 10:17 pm
by facets
Age old question.
Why would firefox behave differently?
I have to refresh the page because within the form the the user can update the data base which drives many dropdown menus.
so, the users clicks a javascript button and pops up a window and adds data to the db, close this window.
then i force the page to reload to include the newly added data to the drops down menus.
this method was used to work around the nested forms issue.
does that sound right?
Posted: Thu Oct 27, 2005 6:02 am
by Chris Corbyn
Heh.... another situation where AJAX would prove very handy, although not strictly needed.
When you do thet refresh, what you should actually do is to submit the data via POST or GET and collect it at the server end, perhaps put it into a SESSION.
Once you have that info you can put it back into the form value attributes when the page reloads

Posted: Thu Oct 27, 2005 6:16 am
by foobar
d11wtq wrote:Heh.... another situation where AJAX would prove very handy, although not strictly needed.
When you do thet refresh, what you should actually do is to submit the data via POST or GET and collect it at the server end, perhaps put it into a SESSION.
Once you have that info you can put it back into the form value attributes when the page reloads

Alternatively, you could check for when the page is being exited via:
Code: Select all
<body onbeforeunload="/* Do some crazy stuff */">
...and have a JS function attached to it to check if the user tried to refresh the page using either F5 or Shift-R or whaterver. I remember I used that for my chat script, can't remember the exact code though; plus I'm at school now so I don't have FTP access to it

.
Posted: Thu Oct 27, 2005 6:41 am
by facets
I don't suppose there is another way to reload just the drop down menu portion of a page without reloading the whole page?
Posted: Thu Oct 27, 2005 6:56 am
by Roja
facets wrote:I don't suppose there is another way to reload just the drop down menu portion of a page without reloading the whole page?
You could via AJAX.
d11wtq | http://xaxjax.sourceforge.net