This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about el.setAttribute("readOnly","true")
 
Srivatsa Katta
Ranch Hand
Posts: 55
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic