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? Link to comment https://forums.phpfreaks.com/topic/77885-solved-pop-up-message-with-different-directors/ 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"; } Link to comment https://forums.phpfreaks.com/topic/77885-solved-pop-up-message-with-different-directors/#findComment-394233 Share on other sites More sharing options...
djfox Posted November 19, 2007 Author Share Posted November 19, 2007 Oh ok, thanks very much! Link to comment https://forums.phpfreaks.com/topic/77885-solved-pop-up-message-with-different-directors/#findComment-394239 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.