Retrieve Parameter Value from Disabled Input

Discussion in 'Java' started by Sisilla, Mar 3, 2008.

  1. Sisilla

    Sisilla Guest

    Hello All,

    I am setting the value of a disabled text input form element with
    JavaScript. How can I retrieve its value in Java?

    request.getParameter(textInputID);

    always seems to return 'null'.


    I appreciate any effort to help me. Thank you for your time and
    consideration.

    Sincerely,

    Sisilla
     
    Sisilla, Mar 3, 2008
    #1
    1. Advertising

  2. Sisilla

    Lew Guest

    Sisilla wrote:
    > I am setting the value of a disabled text input form element with
    > JavaScript. How can I retrieve its value in Java?
    >
    > request.getParameter(textInputID);
    >
    > always seems to return 'null'.


    <http://www.w3schools.com/tags/tag_input.asp>
    The 'disabled' attribute "[d]isables the input element when it first loads so
    that the user can not write text in it, or select it."

    So it is never entered into the request as a parameter.

    Thus a server-side attempt to retrieve this value that was never entered into
    the parameter list will always receive null. Because the parameter isn't
    there. Because its input was disabled.

    --
    Lew
     
    Lew, Mar 3, 2008
    #2
    1. Advertising

  3. Sisilla

    Sisilla Guest

    Thanks, Lew. I made the element read-only instead of disabled and used
    css to give it the look of a disabled element. Thanks for your help.
    ~Sisilla
     
    Sisilla, Mar 5, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cipher
    Replies:
    1
    Views:
    3,604
    Natty Gur
    Jul 11, 2004
  2. nono
    Replies:
    0
    Views:
    121
  3. lehmann

    sending input value even if disabled

    lehmann, Jan 19, 2004, in forum: Javascript
    Replies:
    2
    Views:
    126
    Michael Winter
    Jan 19, 2004
  4. Susan Cranford
    Replies:
    2
    Views:
    430
  5. David
    Replies:
    5
    Views:
    1,799
    Scott Sauyet
    Jul 28, 2011
Loading...

Share This Page