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:

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: 1

Leave a Reply

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