Need help with this confirm alert script, Please!
My question is below, but I found the answer so I wanted to post this so no one would waste their time responding. For those that might need the answer some day, here is how you do it:
<script language="javascript">
if (confirm("blah, blah, blah!"))
{
window.location.href="http://www.whatever.com/your_page_name_here.htm";
}
else
{
window.close();
}
</script>
The first part of this script does what I want and that is go to the link shown, but the "else" statement, I just want the page to close when the user clickes the Cancel button.
<script language="javascript">
if(confirm("blah,blah,blah!"))
{
window.location.href="http://www.whatever.com/my_page_here.htm";
}
else
{
window.location.href=""; <--- Here, I just want the entire window to close when they click the Cancel button.
}
</script>
Would you be so kind as to provide the sytax code to do this? I am stumped. :)
__________________
Rudy
|