• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how about el.setAttribute("readOnly","true")
 
Srivatsa Katta
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nici,

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

Thanks a lot !!

-Tripter
reply
    Bookmark Topic Watch Topic
  • New Topic