try onclick="check(this.myname)" -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 11:20 AM To: [EMAIL PROTECTED] Subject: checkbox onclick event not getting called
Hi, My code is like the following, when I click the checkbox, nothing happened (the 'add' button suppose to get disabled). I put a alert statment in the javascript, and didn't get it showed when click the checkbox... seems the function didn't get called at all, can anybody tell me why? Thanks a lot! <SCRIPT LANGUAGE="JavaScript"> function check(element) { alert("getting called"); document.myform.add.disabled = ( element.checked ); } <html:form action="myAction" name="myForm"> <html:submit propery="add" value="Add"/> <input type="checkbox" onclick="check(this)" name="myname" value="myvalue"/> --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]