File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes textarea and conditional READONLY 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 "textarea and conditional READONLY" Watch "textarea and conditional READONLY" New topic
Author

textarea and conditional READONLY

Ramesh Patil
Greenhorn

Joined: Aug 09, 2004
Posts: 17
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

Joined: Mar 20, 2005
Posts: 256
how about making it readonly on change of the text area?


Life called,so here I am.<br />Cheers<br />Niki.:-)
Ramesh Patil
Greenhorn

Joined: Aug 09, 2004
Posts: 17
Yes but how do you make the READONLY tag conditional
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256


If this is not what you want then i have not understood your problem. please make it more clear.
Ramesh Patil
Greenhorn

Joined: Aug 09, 2004
Posts: 17
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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: textarea and conditional READONLY
 
Similar Threads
Value in the textarea is not retaining in jquery popup modal.
c:set adding a newline
Want to display non editable in a frame
Help with values from HTML page to JSP page.
Show text attachment in Servlet