473,320 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

It's the simple things that drive me crazy... Can someone peek at this short script?

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,scrol lbars=yes');
if (window.focus) {newwindow.focus()
return false;
}
else
return true;}
// End -->
Jul 20 '05 #1
1 1738
In article <86**************************@posting.google.com >,
ad***@lumenresearch.com (Christopher) writes:
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 )


Try referencing the form element properly:
if (!document.formName.checkBoxName.checked)

Or:

if (!document.forms["formName"].elements["checkBoxName"].checked)
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Thomas Heller | last post by:
I'm currently working on a new version of py2exe, which will require Python 2.3 and later, because it uses the zipimport mechanism. Since py2exe is a distutils extension, and since C compilers...
7
by: Benjamin Han | last post by:
I know I can do this by get sys.argv, tell if it's a full path, and if not, somehow join the relative path with getcwd(). Just wondering if there's a simpler way to do this. Thanks!
9
by: Martin | last post by:
Due to the the large numbers of MS trained programmers unemployed we are looking at using MS Development environments. VB programmers are currently 10 a penny. However I find C a bit more...
2
by: Garry Freemyer | last post by:
I wrote a screensaver, via Visual Studio 2003 in C# and I decided a wiser choice for me was to use an xml file to save my configs. Btw: I wonder if this is why every bit of documentation I've found...
2
by: Preston | last post by:
public Abc test() { if (oneStack.Count != 0) return (Abc)oneStack.Peek(); } I'd like to do return (Abc)oneStack.Peek()first, and then do receiveStack.Pop()
12
by: Brett Hofer | last post by:
I must be missing something - Im a veteran C++ programmer now working with C# overall I like the language but find many weird changes... Anyway Im writing code behind an aspx. In this one C#...
1
lwwhite
by: lwwhite | last post by:
This is driving me crazy and probably has a simple solution. Access 2003 Win XP. On a form, I have an unbound text box named "drive." I have an unbound combo box called "version" that looks up values...
0
by: Linda Jimerson | last post by:
Hello - I created a simple Bulleted Rollover List from a Listamatic resource. When I contain this list (in a DIV with a width), IE 6.0 goes crazy (makes a mess). All other browsers act...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.