Your Alert call from Javascript is not in the proper event.......
it should be called in the "onsubmit" event of the button......
somehow it is called after the page is unloaded.
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Merrill George
> Sent: Friday, March 02, 2001 11:31 PM
> To: [EMAIL PROTECTED]
> Subject: Back Button
>
>
> Hi all,
> I have developed a jsp page which on submit calls itself
> recursively.
> That is the jsp is test.jsp and its form action="test.jsp".
> My problem is , when it calls itself depending on certain conditions i
> show an alert
> on the onLoad trigger because for different conditions i've got
> different <BODY> tags.
>
> For example when i Press a 'Save' Button I get a number from a
> database and i show it in the alert as
> 'Record 1000blah Created'
>
> suppose i go from this page and press the back button the page appears
> with the alert. with the same message
> which is awkward. Is there a way to avoid this?
> thanks
> Merrill
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets