View Single Post
  #1 (permalink)  
Old January 24th, 2004, 11:26 PM
larry larry is offline
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default Confirm alert box - need help, 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>

---------------------------------------------------------

I apoogize for cross posting this on two topics but I really need an answer on this tonight if possible, and it's Saturday night at 8:30 PM, and I want this request to hit a couple of topic areas where there might be someone there tonight.  I promise not to make a practice of this

<script language="javascript">

if(confirm("This page is reserved for registered users only.\n\n Click OK to register for your full version of the exams!"))
{
window.location.href="http://www.networkdriven.com/qp/purchase_page_continued_all.htm";
}
else
{
window.location.href="";  <---- I just want the entire window to close here
}
</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.

Would you be so kind as to provide the sytax code to do this? I am stumped
__________________
Rudy
Reply With Quote