A Digital Age Deserves A Digital Leader

Switching readonly textboxes to nonreadonly

Switching readonly textboxes to nonreadonly

Postby gries818 » Tue Aug 05, 2008 2:26 pm

Is it possible use javascript to switch textboxes that I have on a web application to nonreadonly.

I could simply overwrite with new none readonly textboxes but obviously if I could just change the property without needing any overwrites it would be preferable.

Thanks!
Image

Mac OS 10.6.7 - Personal
Ubuntu Server 11.04 - Server
Software Development
User avatar
Posts: 3991
Joined: Wed Jul 07, 2004 6:28 pm

Postby gries818 » Tue Aug 05, 2008 3:22 pm

ok. after looking through a huge manual available for my use and making sense of the stupid example they gave the solution is amazing simple. In fact, the only reason I didn't see it was because Visual Web Developer didn't give me the option in the drop down... who knows why? lol

This is what you have to do:

Code: Select all
document.getElementById('your_id').readOnly = false;


Anyway, I hope this saves somebody else the time it took me to track it down lol.
Image

Mac OS 10.6.7 - Personal
Ubuntu Server 11.04 - Server
Software Development
User avatar
Posts: 3991
Joined: Wed Jul 07, 2004 6:28 pm

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 0 guests

cron
cron