Solved

when click Back Button javascript alert reppears

Posted on 2006-11-15
1
270 Views
Last Modified: 2008-01-09
I'm using JSP to do form validation on postback...I show an alert message when a form field is invalid after verifying against database.  If the field is valid, we go to a Thank you page.  But if I hit the Back button I'm seeing the alert box again and have to click OK on the box to go back to the form.  How can I go back to the form from the Thankyou page without seeing the alert

Don't want to use cookies because what if that form field is entered invalid more than once when the user initially fills the form...
0
Comment
Question by:murads3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
Messiadbunny earned 500 total points
ID: 17962530
I'd suggest something along the lines of checking the referral address.  So if they are coming from the thanks page then it voids all alert messages.  

  if (document.referrer != 'www.bla.com/thankspage.html')

Something along those lines.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
The viewer will learn how to dynamically set the form action using jQuery.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question