Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2005
    Location
    Ireland
    Posts
    122
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Radio buttons selected

    I cant get the length of a group of radio buttons.

    the javascript is:

    Code:
    function Validate(form)
    {
      var overall_result = false;
      var not_checked,id;
      var docs = new Array();
    
      var docs_ids = document.MainForm.docs_ids.value;
      docs = docs_ids.split(",");
      for (var i=0; i<docs.length; i++)
      {
        id = docs[i];
        alert(document.MainForm.id.length);
        for(var x=0; x<document.MainForm.id[x].length; x++)
        {
          if (document.MainForm.id[x].checked)
          {
            alert(id[x]);
            not_checked = docs_ids[i];
          }
        }
      }
     
      return overall_result;
    }
    and the html takes the form:

    Code:
    <tr>
      <td><input type="radio" name="29075" value="approve" /></td>
      <td><input type="radio" name="29075" value="reject" /></td>
      <td><input type="radio" name="29075" value="abstain" /></td>
    </tr>
    <tr align="center" class="table1content">
      <td><a href="">SE.03</a></td>
      <td><input type="radio" name="53039" value="approve" /></td>
      <td><input type="radio" name="53039" value="reject" /></td>
    </tr>
    Any help would be greatly appreciated
    Last edited by tom123; 01-03-2007 at 11:26 AM.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Take a look at the examples on this page they may help you

    http://www.huntingground.freeserve.c..._radwhichm.htm
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

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