• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

html:text + struts + disable/readOnly problem

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
am using struts html:text tag. when I am using

document.forms[0].myTextBoxProp.disabled=true;
or
document.forms[0].myTextBoxProp.readOnly=true;
document.forms[0].myTextBoxProp.readonly=true;


(note the font change for letter 'o').
The textbox field is neither disabled nor readonly( text box value is still being editable)

Any trciks or advises?

Thanks in advance to all the repsonders....
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
something that you might try is using the logic tag and having a boolean value that you can change between editable and non-editable, and having 2 different possible sets of display info.
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Knibbas. I thought of doing that and trying to know is there any mistake I am doing, before I go for a round about method.

I hope what you suggested is the only way.

The tags some times make our coding miserable.

Thanks again and enjoy your ' Thanks Giving' holiday.( Hope you are in USA)
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Puthriah Sarma:
Thanks Knibbs. I thought of doing that and trying to know is there any mistake I am doing, before I go for a round about method.

I hope what you suggested is the only way.

The tags some times make our coding miserable.

Thanks again and enjoy your ' Thanks Giving' holiday.( Hope you are in USA)

 
A knibbs
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks again and enjoy your ' Thanks Giving' holiday.( Hope you are in USA)



No but thanks for the well wishing.

Hope it all works out for you.
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hereunder I am pasting the code that worked for me. This may be useful for other folks.

This may be a horrible way to do when there are more fields. But I found this as the only solution.

Any better thoughts are welcome..


reply
    Bookmark Topic Watch Topic
  • New Topic