Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable a radio button

 
river down
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
How will you disable a radio button upon loading of the page....
Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look at this
remove the _ from on_click

<html>
<head>
<script>
dis=true;
function DisableIt(x){
if(dis){x.checked=false;}
}
</script>
</head>
<body>
<form name="A">
<input type="radio" name="B" value="1" on_click="DisableIt(this)" >
</form>
</body>
</html>
 
river down
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot...I'll try that...though I pretty much figure out the solution my way ...but I can try if it does not work...thanks for the help...
bye...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic