aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes non-editable in textarea 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 "non-editable in textarea" Watch "non-editable in textarea" New topic
Author

non-editable in textarea

Sophia Choi
Ranch Hand

Joined: Mar 22, 2002
Posts: 106
Can I display data only in textarea and make it non-editable ?
Thanks
sunitha reghu
Ranch Hand

Joined: Dec 12, 2002
Posts: 937
Yes u can do that.
Like this
textarea cols="" rows="" disabled readonly textarea
or can use only disabled.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61653
    
  67

The disabled attribute is not necessary to effect a non-editable field; the readonly attribute is sufficient. The disabled attribue will cause a browser-specific rendition to be applied to the area -- usually a dimming effect (which is fine if that's what you want).
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61653
    
  67

A useful resource for such information.
hth,
bear
sunitha reghu
Ranch Hand

Joined: Dec 12, 2002
Posts: 937
It depends whether disabled or read only.
I used disbled attribute in a text field which i want a dimed effect so that users know this is something u can change. But if u have a scrolling text box then disable ork coz u cant scroll the bar.
If u dont have a scrollable then disabled will work.That is wat i said either read only or disabled.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
what I would use is:
readonly="readonly"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61653
    
  67

A man after my own heart! Yeah, I use the xhtml notation whether the page is html or xhtml. It's just, well, neater!
bear
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: non-editable in textarea