Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change readonly attribute 1

Status
Not open for further replies.

crabgrass

Technical User
Aug 29, 2007
111
US
Is it possible to change the readonly attribute of a text input using a javascript function?
 
yes, You can change the disabled property and readonly property of input elements.
 
The only special "trick" to changing the readonly status is that it is case sensitive:

Code:
read[!]O[/!]nly

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
OK Folks, sorry I was not specific enough. I should have asked,

How do you change the readonly attribute of a text input using javascript?

Thanks kaht. I got it to work with

document.forms["tippage"].PlanOut.readOnly = false
 
good job [thumbsup2]

It's nice to give a small hint and let the OP take it from there. It lets me know they learned something [smile]

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top