This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes TextField Readonly issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "TextField Readonly issue" Watch "TextField Readonly issue" New topic
Author

TextField Readonly issue

sudharshan tettu
Ranch Hand

Joined: Jul 17, 2006
Posts: 124
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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
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.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
rahul khanna
Ranch Hand

Joined: Sep 14, 2005
Posts: 48
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TextField Readonly issue
 
Similar Threads
how to make select list uneditable
<h:inputText tag in JSF not updating the managed bean values when attribute is readonly=true.
generate table fields by clicking an option!!!
JSF input text readonly issue
how to get the value from the readonly field?????