Hi,
I'd like to synamically change the readonly attribute of a text box using Javascript. I've tried
document.theForm.theObject.readonly=false;
and
document.getElementById('theObject').readonly = false;
but niether seem to work, can anyone help !!![]()
| SitePoint Sponsor |
Hi,
I'd like to synamically change the readonly attribute of a text box using Javascript. I've tried
document.theForm.theObject.readonly=false;
and
document.getElementById('theObject').readonly = false;
but niether seem to work, can anyone help !!![]()
Cheerz
Austin Rathe
Developer
www.Breeze-It.com


Have you tried:
document.theForm.theObject.disabled=true to not allow someone to edit a text field and
document.theForm.theObject.disabled=false to enable them to.
Yea, but the disabled atribute means that anything submitted can't be "sucessful", ie isn't passed onto the processing agent, also, i want user's to be able to copy from the box.Originally posted by requestcode
Have you tried:
document.theForm.theObject.disabled=true to not allow someone to edit a text field and
document.theForm.theObject.disabled=false to enable them to.
Thanks anyway.
Cheerz
Austin Rathe
Developer
www.Breeze-It.com

Don't know if this will work, haven't tried it
Code:document.theForm.theObject.readOnly = true document.theForm.theObject.readOnly = false![]()
Bookmarks