Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

IE doesn't retain form fields  RSS feed

 
Pritam Banerjee
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I have a form generated by a JSP page.
The form contains a few (7-8) fields.
When the page is submitted it goes to a servlet and finally the request gets forwarded to the next JSP that renders the next html.
There is a cancel button in the next page (that is effectively doing history.back() in the onClick event). When this cancel button is clicked the request is again going to the server (instead of the browser taking it from it's local cache) and hence the form in the previous page is reloaded with all fields empty. This means the user would have to re-type all fields.
The same thing works fine in Netscape, but the reload of the previous page on history.back() is happening for IE browser only.
How do I make sure that the previous page form doesn't reload ?
I haven't used any META tags like expires or no-cache, no-store etc.
Any help would be appreciated.
Regards,
Pritam
 
Mark Howard
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pritam
I'd check the Tools --> Internet Options --> General --> Settings in your IE browser, where you are able to specify how frequently the browser should download the page from the server.
 
RAJESH RASTOGI
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
have u checked the input type for the button on which u r applying the onClick event.
if u have given input type submit change it to button.
now it will get work.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!