Ashwani Kalra wrote:
> Hi all
> This question was asked yeaterday.
> Is there any way to track if user has pressed the refresh button of the
> browser.I want to ignore that request ???
>
It was also answered yesterday -- if you ignore the request, your user ends up
with a blank page and/or an error message like "The document contains no data."
What you need to do is store a hidden input variable (say, a transaction id
number) in your forms, and save the last transaction id that you've processed in
the user's session. When the user presses reload, the same transaction id will be
posted again -- and you can recognize that to avoid trying to add something to the
database twice.
You are still going to need to generate some HTML output, but it is quite easy to
detect the case you were concerned about.
>
> Any idea
>
> Thanks
> Ashwani
>
Craig McClanahan
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html