Validating checkboxes

Results 1 to 2 of 2

Thread: Validating checkboxes

  1. #1
    David Brower Guest

    Default Validating checkboxes

    Does anybody know how to ascertain whether a checkbox has been ticked using JScript/JavaScript? I want to make sure that the user can&#039t start a search if he/she hasn&#039t ticked a checkbox. I&#039ve tried using the follwoing script but it doesn&#039t ssem to work, I&#039m afraid. <BR><BR> function checkIt() {<BR> searchArray = document.Search.checkCategory;<BR> for (i=0; i&#060;= searchArray.length; i++) {<BR> if (searchArray[i].checked) {<BR> return true;<BR> }<BR> }<BR> return false;<BR>}<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Validating checkboxes

    You could try<BR>(searchArray[i].value = checked)

Posting Permissions

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