This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

textarea and conditional READONLY

 
Ramesh Patil
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have an empty text area. After I paste some text on the textarea, I need to change the textarea to readonly. I would greatly appreciate any help with this.
Thanks
Ramesh Patil
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about making it readonly on change of the text area?
 
Ramesh Patil
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes but how do you make the READONLY tag conditional
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


If this is not what you want then i have not understood your problem. please make it more clear.
 
Ramesh Patil
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. It worked . Used DOM

<script language=javascript>
function bevent()
{
var xx = document.xx.btest;
xx.readOnly= true;
}
</script>

<form name=xx>
<textarea name=btest onChange="bevent()" rows="1" cols="20">


</textarea>
</form>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic