Disabled textbox??

Discussion in 'Javascript' started by JS, Jun 1, 2005.

  1. JS

    JS Guest

    I have a textbox and a button. Sometimes this textbox will be disabled and
    other times it will be enabled. When its disabled I guess its value is null.
    But is the the text string "null" or is it just nothing??

    I have a function that will need to check the value of this textbox when its
    disabled like:

    <input name="search" type="text" id="search">

    String word = (String)request.getParameter("search");

    but when its disabled will it make sense to hold null in a String??
    JS, Jun 1, 2005
    #1
    1. Advertising

  2. JS wrote:

    > I have a textbox and a button. Sometimes this textbox will be disabled and
    > other times it will be enabled. When its disabled I guess its value is
    > null.


    When it is disabled then its value is whatever its value is.

    > String word = (String)request.getParameter("search");


    This looks like Java, not JavaScript. You seem to be in the wrong newsgroup.
    When a control is disabled it is not a successful control. It won't be
    submitted at all. What value your GET/POST parsing library allocates to it
    depends on that library, it will be the same value you get if you try to
    access any parameter which isn't included in the submitted form data (such
    as getParameter("notInTheFormAsIJustMadeItUp").

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jun 1, 2005
    #2
    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. =?Utf-8?B?QW5kcsOpcyBPcnTDrXo=?=

    Disabled copy paste in TExtBox

    =?Utf-8?B?QW5kcsOpcyBPcnTDrXo=?=, Jun 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,818
    willow
    Jun 9, 2005
  2. PJ6
    Replies:
    2
    Views:
    649
  3. Replies:
    4
    Views:
    7,885
  4. =?Utf-8?B?VG90eSBTYW50YW5h?=

    Disabled TextBox

    =?Utf-8?B?VG90eSBTYW50YW5h?=, Sep 27, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    409
    Mark Rae
    Sep 27, 2006
  5. hal
    Replies:
    1
    Views:
    1,287
    Alexey Smirnov
    May 21, 2008
Loading...

Share This Page