Hi
Example ( Should work... I did not check :) )
Replace FORMNAME/RADIONAME with yours
<html>
<head>
<script language="JavaS cript">
function checkRadio(){
var bIsChecked = false;
var r = document.forms["myForm"].r1;
for(i=0;i<r.len gth;i++)
{
if( r[i].checked )
{
bIsChecked = true;
break;
}
}
if(!bIsChecked ) alert("Please check.... ");
return bIsChecked;
}
</script>
</head>
<body>
<form name="myForm">
<input type="radio" name="r1">
<input type="radio" name="r1">
<input type="radio" name="r1">
<input type="radio" name="r1">
<input type="radio" name="r1">
<input type="submit" onclick="return checkRadio()" value="Click to test
radio">
</form>
</body>
</html>
Note if for some reason the list has only 1 item the length will be
undefined.
And also we have a good group for client issues
microsoft.publi c.scripting.jsc ript
--
Best Regards
Vidar Petursson
=============== ===============
Microsoft Internet Client & Controls MVP
=============== ===============
"jayuya" <ja****@cox.net > wrote in message
news:03******** *************** *****@phx.gbl.. .
How can i check in java script if a asp.net radio button
list server control is selected?
I have some custom javascript function in the client side
that needs to run but I don't see the way to see if user
selected or not one of the options....
thanks,
jayuya