OnClick Event Handler

Results 1 to 2 of 2

Thread: OnClick Event Handler

  1. #1
    Chad Franklin Guest

    Default OnClick Event Handler

    I need to disable two check boxes. I can disable one no problem, but can disable any more then that. Can someone give me the code to disable many check boxes on a Onclick event.<BR>Thanks in Advance.

  2. #2
    marielle Guest

    Default disabling many checkboxes

    I don&#039t know if your checkboxes all have the same name.<BR>If they don&#039t, you have to disable them one by one using their names.<BR>example :<BR>On the onclick event call a javascript function<BR>function disable() {<BR>frmForm.chkOne.disabled = true;<BR>frmForm.chkTwo.disabled = true;<BR>and so on...<BR>}<BR><BR>If all your checkboxes have the same name, they will be seen as an array. If you have a limited amount of checkboxes, I suggest you give them all a unique name.<BR>If you don&#039t know how many checkboxes you have, you&#039ll have to check the array (you have to be sure there is an array).<BR>example : <BR>On the onclick event call a javascript function<BR>function disable() {<BR>var nLength = frmForm.chkBox.length;<BR>for (i=0;i&#060;nLength;i++) {<BR>frmForm.chkBox[i].disabled = true;<BR>} <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts