PDA

View Full Version : enable / disable radio buttons and text


rodders63
07-16-2002, 02:37 PM
Hi all,
How can I disable / enable text and radio buttons in an html document. I realise the "disable" attribute can be used to enable single objects like text fields and combo boxes, but not sure when using text (I'd like to enable/disable the text adjacent to the text fields) and radio buttons,

Thanks in advance
Rod.

hryan
07-16-2002, 03:55 PM
<input type="text" name="q2t" size="20" disabled >
<input type="radio" name="ans[3]" value="Y" onClick="turnOn(3,0)" disabled >

You can turn them on?of with

this.form_name.element_name.disabled=true
or
this.form_name.element_name.disabled=false

Like this one:

this.form_name.q2t.disabled=false


OK?
;)