|
|
Subject:
JS - Why doesn't this script work?
Category: Computers > Programming Asked by: cclegg06-ga List Price: $5.00 |
Posted:
07 Aug 2003 12:06 PDT
Expires: 06 Sep 2003 12:06 PDT Question ID: 241082 |
Can someone tell me why this doesn't work? I'm trying to pop a page if someone exits a page and a checkbox is left unchecked. // Start onUnload script// function noBuy(){ if (agree.checked == false ) { newwindow=window.open('http://www.mysite.com','name','height=500,width=500,scrollbars=yes'); if (window.focus) {newwindow.focus() return false; } else return true;} // End --> | |
| |
| |
| |
|
|
Subject:
Re: JS - Why doesn't this script work?
Answered By: secret901-ga on 08 Aug 2003 11:52 PDT Rated: |
Hello cclegg06, I'm glad that my suggestion solved your problem. Below is my original suggestion. It appears that you forgot a closing curly bracket (}) after newwindow.focus(). However, your true problem may lie in the way you refer to the checkbox. I hope that it was helpful. If you still encounter problems in your script, please request for a clarification and I will be glad to assist you further. Good luck, secret901-ga Search strategy: javascript reference |
cclegg06-ga rated this answer: |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |