[Javascript] checkbox onChange delay
Roland Neilands
rneilands at pulsemining.com.au
Wed Jan 9 19:19:22 CST 2008
Gday all,
I notice that this bit of code is annoyingly slow to fire in IE7, but
works immediately in FF. Checking the box in IE does nothing at all,
until the next click or key press. Is this just an IE bug or should I be
using something other than onChange for checkboxes? It works fine for
other input types. I renamed the function with the same result.
function doClose(itm) {
vJnl = document.getElementById("jnlamt" + itm);
vCls = document.getElementById("comflg" + itm);
if (parseFloat(vJnl.value) != 0 ) {
vCls.checked = false;
window.alert("Close not allowed if value is not zero.");
}
}
<input type="checkbox" id="comflg1" name="comflg1" value="yes"
onChange="doClose('1');" />
...
Regards,
Roland
This e-mail is solely for the use of the intended recipient and may contain information which is confidential or privileged. Any unauthorised use of its contents is prohibited. If you have received this e-mail in error, please notify the sender via return e-mail and then delete the original e-mail.
More information about the Javascript
mailing list