Lock textfield with Radio Button

[Total: 0    Average: 0/5]

This shows a method to have a field in a form disabled ona radio button choice to do so.

Body Code:

<form> 
On:<input type="radio" name="r1" onClick="this.form['text1'].disabled=false;"><br> 
Off:<input type="radio" name="r1" onClick="this.form['text1'].disabled=true;"><br> 
<input name="text1" onFocus="if(disabled)blur();"> 

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *