Readonly

H

Hamish

I have an input box which is created with the readonly option included. Is
it possible to turn this off.

This is so the input box is not selectable untill a radio button is switched
on.

I have tried form.ip.readonly = false, but this doesn't work

Thanks
 
M

Martin Honnen

Hamish said:
I have an input box which is created with the readonly option included. Is
it possible to turn this off.

This is so the input box is not selectable untill a radio button is switched
on.

I have tried form.ip.readonly = false, but this doesn't work

Case is important, the name of that property is readOnly and not readonly:
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-88461592
so try
<input type="radio"
onclick="if (this.checked) {
this.form.elements.inputName.readOnly = false;
}">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top