• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

non-editable in textarea

 
Sophia Choi
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I display data only in textarea and make it non-editable ?
Thanks
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes u can do that.
Like this
textarea cols="" rows="" disabled readonly textarea
or can use only disabled.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A useful resource for such information.
hth,
bear
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what I would use is:
readonly="readonly"
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic