djfox Posted November 19, 2007 Share Posted November 19, 2007 When a pop up message appears, it has the ok or cancel buttons. How do you tell the script to direct the user to page1.htm when the press ok and to send the user to page2.htm when they press cancel? Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted November 19, 2007 Share Posted November 19, 2007 try this if (prompt("do you want to continue")) { location.href = "page1.htm"; } else { location.href = "page2.htm"; } Quote Link to comment Share on other sites More sharing options...
djfox Posted November 19, 2007 Author Share Posted November 19, 2007 Oh ok, thanks very much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.