
There are 3 radio button as A,B,W. there are another radio as 1,2,3.if we select W in first radio button then should select 2nd one(1,2,3).if we select A or B not need select any one from 1,2,3.

Here is an example that validate the radiobutton.
<html>
<script language = JavaScript>
function validate(){
if(document.f1.radio[2].checked == true){
if ( ( document.f1.radios[0].checked == false ) && ( document.f1.radios[1].checked == false )&& ( document.f1.radios[2].checked == false ) ){
alert ( "Please choose any radio button from second one!" );
document.f1.radios[0].focus();
return false;
}
}
return true;
}
</script>
<form name="f1" onsubmit ="return validate();">
<pre>
Select: <input type="radio" name="radio" value="A">A <input type="radio" name="radio" value="B">B <input type="radio" name="radio" value="W">W
Select: <input type="radio" name="radios" value="1">1 <input type="radio" name="radios" value="2">2 <input type="radio" name="radios" value="3">3
<input name="Submit" value="Send" type="submit" >
</pre>
</form>
</html>

Thank you.it is working
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.