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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Readonly in a class

Status
Not open for further replies.

crabgrass

Technical User
Aug 29, 2007
111
US
Is it possible to set the readonly attribute in a class definition?

Thanks
 
Nope. Readonly state is a behaviour of an input field, not it's display. As such it cannot be defined in css, which is used to manipulate display of elements.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
OK Thanks.
Darn!!
Is there an easy way to set all the inputs on a form from readonly to not readonly and back without setting each one separately?

 
You can reach collection of tags by name within an element via javascript and loop through them. You can ask in forum216 on how to do that.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top