Solved

when click Back Button javascript alert reppears

Posted on 2006-11-15
1
272 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

636 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