• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

textarea and conditional READONLY

 
Ramesh Y 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 Y 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 Y 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