J
Jimbo
Hi,
I am trying to set the readonly attribute of a text input tag dynamically
from javascript. The input element already exists in the form and I want to
make it readonly when a particular button is pressed. I have tried the
following in javascript;
function makeReadonly()
{
document.formName.inputTagName.setAttribute("readonly", "true");
}
However this doesn't have any effect. Should this work or should I be doing
something else?
Many thanks,
Jimbo.
I am trying to set the readonly attribute of a text input tag dynamically
from javascript. The input element already exists in the form and I want to
make it readonly when a particular button is pressed. I have tried the
following in javascript;
function makeReadonly()
{
document.formName.inputTagName.setAttribute("readonly", "true");
}
However this doesn't have any effect. Should this work or should I be doing
something else?
Many thanks,
Jimbo.