This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have disabled two text fields .However when I click on submit button i want to read the values of disabled text fields.
can anyone suggest me how to resolve my problem. [ September 24, 2007: Message edited by: Shrikanth Nekkanti ]
Tarun Yadav
Ranch Hand
Joined: Sep 20, 2007
Posts: 134
posted
0
Originally posted by Shrikanth Nekkanti: How to make text field readable in JSP. If I disable text field values wont be submitted i suppose. how to resolve this
Not quite sure what you're asking. You want to disable a user from editing a text field but also read the value on submitting?
You're right about disabled fields not being submitted. You could work around this in a couple of ways; put the required value in a hidden field with the required name and name the text field something else. Or you could enable the text field and use JavaScript to stop the user from editing the field by continually removing focus from the field when the user tried to select it; but this is a pretty sad hack and has the additionally vulnerability of being useless if the user disables scripting.
I would use the first method myself, can't think of anything else.