onChange with checkbox

W

Wim Roffal

I wanted to use onChange with some checkboxes. However, the function is only
called when the focus is shifted to the next field.

Instead I would like my function to be called as soon as the user changes
the checkbox. Is that possible?

Thanks,
Wim
 
K

kaeli

wimroffelplease@nospamm- said:
I wanted to use onChange with some checkboxes. However, the function is only
called when the focus is shifted to the next field.

Instead I would like my function to be called as soon as the user changes
the checkbox. Is that possible?

Any click changes the box for that element. Use onClick. Be careful -
IIRC, the onClick fires *before* the "checked" property is changed.
Check on that if you use it.


-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top