I have the following code to show a pop-up alert message to the user, when he tries to close the browser or go back or type in a different URL.<BR><BR>&#060;form method="post" action="testasp.asp" name="ValidateSales" onsubmit="return validations();"&#062;<BR> &#060;input type="submit" value="Submit"&#062;<BR>&#060;/form&#062;<BR><BR>&#060;script language="Javascript"&#062;<BR>var allowredir = false;<BR>window.onbeforeunload = whileunload;<BR><BR>function whileunload(){<BR> if (allowredir == false){<BR> mess = "You will lose all information provided
during navigation of this site";<BR> return mess;<BR> }<BR>}<BR><BR>function validations(){<BR> allowredir = true;<BR>}<BR><BR>It works fine in a way that if the user likes to go back, it shows up the alert box, but if he chooses to click "Yes" as the option, IT GOES BACK, which is logically correct. But I want the user to go to a different page say "xyz.asp" instead of going back. Is this possible ?? If so, could somebody shed some light on me PLEASE......<BR><BR>Thank you all for taking time to look into this.