File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Srivatsa Katta
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 256
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about el.setAttribute("readOnly","true")
 
Srivatsa Katta
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic