...

View Full Version : Radio buttons selected



tom123
01-03-2007, 11:24 AM
I cant get the length of a group of radio buttons.

the javascript is:



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:



<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

Mr J
01-03-2007, 06:19 PM
Take a look at the examples on this page they may help you

www.huntingground.freeserve.co.uk/scripts/f_radwhichm.htm



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum