View Single Post
Old 11-08-2012, 11:29 AM   PM User | #2
vwphillips
Senior Coder

 
Join Date: Mar 2005
Location: Portsmouth UK
Posts: 4,355
Thanks: 3
Thanked 458 Times in 445 Posts
vwphillips is a jewel in the roughvwphillips is a jewel in the roughvwphillips is a jewel in the rough
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title></title>
<script type="text/javascript">
/*<![CDATA[*/
function Disable(obj,nme){
 var frm=obj.form,r=frm[nme],args=Disable.arguments,z0=0,z0a;
 for (z0=0;z0<r.length;z0++){
  r[z0].disabled=true;
  for (z0a=2;z0a<args.length;z0a++){
   if (args[z0a]-1==z0){
    r[z0].removeAttribute('disabled');
   }
  }
 }

}
/*]]>*/
</script></head>

<body>
<form>
<input type="radio" name="q1" onclick="Disable(this,'q2',1,4);" />
<input type="radio" name="q1" onclick="Disable(this,'q2',2);" />
<br />
<input type="radio" name="q2" disabled="disabled"/>
<input type="radio" name="q2" disabled="disabled"/>
<input type="radio" name="q2" disabled="disabled"/>
<input type="radio" name="q2" disabled="disabled"/>
</form>
</body>

</html>
__________________
Vic

God Loves You and will never love you less.

http://www.vicsjavascripts.org.uk/

If my post has been useful please donate to http://www.operationsmile.org.uk/
vwphillips is offline   Reply With Quote