jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes How to make text field disabled using html tag? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to make text field disabled using html tag?" Watch "How to make text field disabled using html tag?" New topic
Author

How to make text field disabled using html tag?

michelle Wang
Ranch Hand

Joined: Jan 12, 2004
Posts: 65
My code is like this:
<html:text property="branchID" size="10" maxlength="10" styleClass="normal" value="<%=branchID%>" />

How to make this text field disabled (editable=false)?


michelle Wang <br />SCJP 1.4
bhuvan sundar
Ranch Hand

Joined: Mar 02, 2005
Posts: 104
Hi,

The <html:text> tag has an attribute called "disabled" for which you can set the value as either TRUE or FALSE.
michelle Wang
Ranch Hand

Joined: Jan 12, 2004
Posts: 65
Oh yes it works. thanks a lot
 
jQuery in Action, 2nd edition
 
subject: How to make text field disabled using html tag?
 
Similar Threads
HTML Text Filed values
Validate disabled fields
enable and disable a text field
readOnly disable style
Check box (if checks) validation on text field