wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to Read Values From Read only Text field. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to Read Values From Read only Text field." Watch "How to Read Values From Read only Text field." New topic
Author

How to Read Values From Read only Text field.

Shrikanth Nekkanti
Ranch Hand

Joined: Jul 12, 2007
Posts: 48
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.
samir ware
Ranch Hand

Joined: Jul 27, 2005
Posts: 192
hi Shrikanth,
I am not sure if this approch will work in your case or not. But just try out this.
If the name of the text box that you have disabled is account ,just before final submit, call a javascript function ...lets say callMe() in which you will write
document.account.disable =false
and then make the final submit.
Hope this helps you .
Thanks and regards
Samir
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Disabled fields are not meant to be posted back to the server. The only way to post them back is to enable them as discribed above.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

If you use readonly rather than disabled, the fields are submitted.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
wood burning stoves
 
subject: How to Read Values From Read only Text field.