Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TextField Readonly issue

 
sudharshan tettu
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I m taking one text field as readonly and setting its value from javascript.(value is not null)

When the form is submitted ,the value of the text field is passed as null
but not the value
am using struts tags ...
could any one help me how to sort out this issue
Thanks in advance
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question isn't making a lot of sense.
If you're having trouble with English, posting the relevant parts of your code would be a big help.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a difference between READONLY and DISABLED (Google for more info on it). Which one are you using? Probably the latter. A disabled field is not sent when the form is submitted.
 
rahul khanna
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the field is disabled, what you can do is create an extra hidden field and store the value in the hidden field as well. You can then read it from the ActionForm.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic