javascript question

the100thballoon

Emperor
Joined
Aug 13, 2003
Messages
1,239
how do i make a confirm dialog box take the viewer to a different web site when they check "no" or "cancel"? i have this as code so far:

<script language="JavaScript">
<!-- Begin
var agree=confirm("Have you called Sami?");
if (agree)
document.write("");
else
alert("CALL HER!!!!!");
// End -->
</script>



by the way..... sami is my soon-to-be girlfriend which is why i need a reminder to call her.
 
Is this what you have in mind?

<script language="JavaScript">
<!-- Begin
var agree=confirm("Have you called Sami?");
if (agree)
document.write("");
else
window.location="http://forums.civfanatics.com";
// End -->
</script>
 
Back
Top Bottom