SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2000
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need to validate a bank of checkboxes.
    I first make an array of the names likethis:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    var neededCBs = new makeAnArray('practice', 'group', 'hospital', 'other', 'other1');

    function makeAnArray() {
    this.length = makeAnArray.arguments.length;
    for (var i = 0; this.length &gt; i; i++) {
    this[i+1] = makeAnArray.arguments[i]
    }
    }


    [/code]
    Now I need an isFacility function, I want to return false ONLY if NONE of them are
    checked.

    Help Please???



  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2000
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OOPs, forgot to mention that the element named other1 is a text field and not a checkbox. If the other checkbox is checked, I require that the other1 textbox not be empty...


Bookmarks

Posting Permissions

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