Post new topic    Reply to topic
Login to print this topic
Author Message
gries818
PostPosted: Tue Aug 05, 2008 10:26 am Reply with quote

Respected Member
of PROnetworks
 
 


Joined: 07 Jul 2004
Posts: 6565
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!
 
Back to top
gries818
PostPosted: Tue Aug 05, 2008 11:22 am Reply with quote

Respected Member
of PROnetworks
 
 


Joined: 07 Jul 2004
Posts: 6565
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:
document.getElementById('your_id').readOnly = false;


Anyway, I hope this saves somebody else the time it took me to track it down lol.
 
Back to top
Back to top
Index >> Webmaster Domain & Code Room >> Switching readonly textboxes to nonreadonly

Page 1 of 1

Post new topic   Reply to topic


Tired of the Ads? Registered users have 80% less adverts.