?
Solved

when click Back Button javascript alert reppears

Posted on 2006-11-15
1
Medium Priority
?
276 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 1500 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

RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

719 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