wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes readOnly disable style Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "readOnly disable style" Watch "readOnly disable style" New topic
Author

readOnly disable style

Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
How do I make text in a readOnly field look exactly like text in a disabled field.

Thanks
Shrikumar Vadivelu
Greenhorn

Joined: Sep 14, 2005
Posts: 14
Hi, set readonly="readonly" in ur textfield.

like, <input type="text" name="aaa1" readonly="readonly" MAXLENGTH="4" value="991" size="8">

Thanks & Regards,
--Sri.
Pranav Sharma
Ranch Hand

Joined: Oct 27, 2003
Posts: 258
sorry is should have been clear earlier. I know how to set it to readOnly. just wanted to know style'wise' what do i add to the element so it 'looks' like disabled.
for example 'font-color' etc.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

Simply apply the appropriate CSS styles to the element.

You will find more CSS tutorials on the net than you will know what to do with.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: readOnly disable style