[Javascript] I.E.: 1+1=1. Worse yet, Netscape: 1+1 =___
Peter Brunone
peter at brunone.com
Wed Jun 27 16:42:42 CDT 2001
Thomas,
Actually -- in IE 5 anyway -- it seems that the *last* number doesn't get added. Good choice on the pre-filled zeroes, by the way...
Try replacing the (sometimes temperamental) onKeyPress event handler with an onChange or onBlur (this will trip when the focus passes to anything else).
Cheers,
Peter (still just learning like everybody else)
----- Original Message -----
From: McCoy, Thomas
To: 'javascript at LaTech.edu'
Sent: Wednesday, June 27, 2001 4:29 PM
Subject: [Javascript] I.E.: 1+1=1. Worse yet, Netscape: 1+1 =___
Many thanks go to Peter Brunone for your help, however...
I updated the code, but things still don't "add up" (okay, bad joke).
Whichever box I enter a number into first is never added to the total... unless I go back and retype that number once addition has begun. Also, the script seems to be completely ignored by Netscape 4.7. I tried setting an "initial value" of "0" for each form element, hoping that a change from zero would trigger a response from the JavaScript. It did not. The newer version of the form can be tested at http://www.city.newport-beach.ca.us/nbpl/literacyform04.htm. Thanks again for your expertise and time!
Sincerely,
Thomas McCoy (amateur JS programmer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010627/91179395/attachment.htm>
More information about the Javascript
mailing list