aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to set readonly attribute for a dynamically created text item? 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 "How to set readonly attribute for a dynamically created text item?" Watch "How to set readonly attribute for a dynamically created text item?" New topic
Author

How to set readonly attribute for a dynamically created text item?

Srivatsa Katta
Ranch Hand

Joined: Aug 13, 2005
Posts: 55
Hi,

I am creating a text items dynamically, but i want to make some of them readonly based on some conditions, which i am not able to do.

I can make it disabled, but i cant read the disabled parameters in my servlet.

Here is the snippet of my code..


I have used both el.setAttribute('readonly','true');
and el.setAttribute('readonly','readonly'); but none of these are making the text item un-editable..

Please let me know the solution if any !!

I am using IE 5.x

-Tripter
[ October 04, 2005: Message edited by: Bear Bibeault ]
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
how about el.setAttribute("readOnly","true")


Life called,so here I am.<br />Cheers<br />Niki.:-)
Srivatsa Katta
Ranch Hand

Joined: Aug 13, 2005
Posts: 55
Hi Nici,

It works fine with el.setAttribute("readOnly","true")

Thanks a lot !!

-Tripter
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set readonly attribute for a dynamically created text item?