Hidding/Showing Form Field

Discussion in 'ASP General' started by A P, Jan 24, 2005.

  1. A P

    A P Guest

    Hi!

    My first question was, can I hide a form field and make it visible upon
    selecting a particular value on a dropdown select field? Hoping for your
    immediate response.


    Me
    A P, Jan 24, 2005
    #1
    1. Advertising

  2. A P

    Adrienne Guest

    Gazing into my crystal ball I observed "A P" <> writing in
    news:#:

    > Hi!
    >
    > My first question was, can I hide a form field and make it visible upon
    > selecting a particular value on a dropdown select field? Hoping for
    > your immediate response.
    >
    >


    Are you talking about after the form is posted, or before? If it's
    before then you need to look into some client side script, probably a
    little javascript mixed with some CSS.

    If you're talking about a form that posts to itself, then you could do:
    <% if request.form("selectboxvalue") = "whatevervalue" then %>
    <input type="text" name="somename" id="someid" value="somevalue" />
    <% else %>
    <input type="hidden" name="somename" id="someid" value="somevalue" />
    <% end if %>

    --
    Adrienne Boswell
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne, Jan 24, 2005
    #2
    1. Advertising

  3. A P

    A P Guest

    How about dropdownbox within the table? can I hide a row using this lines?

    Me

    "Adrienne" <> wrote in message
    news:Xns95E82A9E57B3arbpenyahoocom@207.115.63.158...
    > Gazing into my crystal ball I observed "A P" <> writing in
    > news:#:
    >
    > > Hi!
    > >
    > > My first question was, can I hide a form field and make it visible upon
    > > selecting a particular value on a dropdown select field? Hoping for
    > > your immediate response.
    > >
    > >

    >
    > Are you talking about after the form is posted, or before? If it's
    > before then you need to look into some client side script, probably a
    > little javascript mixed with some CSS.
    >
    > If you're talking about a form that posts to itself, then you could do:
    > <% if request.form("selectboxvalue") = "whatevervalue" then %>
    > <input type="text" name="somename" id="someid" value="somevalue" />
    > <% else %>
    > <input type="hidden" name="somename" id="someid" value="somevalue" />
    > <% end if %>
    >
    > --
    > Adrienne Boswell
    > http://www.cavalcade-of-coding.info
    > Please respond to the group so others can share
    A P, Jan 24, 2005
    #3
  4. A P

    Evertjan. Guest

    A P wrote on 24 jan 2005 in microsoft.public.inetserver.asp.general:

    > My first question was, can I hide a form field and make it visible upon
    > selecting a particular value on a dropdown select field? Hoping for your
    > immediate response.
    >


    since this has nothing to do with serverside ASP,
    please restrict your Q to relevant NGs

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
    Evertjan., Jan 24, 2005
    #4
  5. A P

    A P Guest

    What I mean was this, can I hide a textbox field including the row where the
    field is located?


    "Steven Burn" <> wrote in message
    news:...
    > Yes... just replace the line containing <input ......> with your <option

    ....>... tag (really should consider using JS for this though as it's
    creating more work than is necessary).
    >
    > --
    >
    > Regards
    >
    > Steven Burn
    > Ur I.T. Mate Group
    > www.it-mate.co.uk
    >
    > Keeping it FREE!
    >
    > "A P" <> wrote in message

    news:#...
    > | How about dropdownbox within the table? can I hide a row using this

    lines?
    > |
    > | Me
    > |
    > | "Adrienne" <> wrote in message
    > | news:Xns95E82A9E57B3arbpenyahoocom@207.115.63.158...
    > | > Gazing into my crystal ball I observed "A P" <> writing

    in
    > | > news:#:
    > | >
    > | > > Hi!
    > | > >
    > | > > My first question was, can I hide a form field and make it visible

    upon
    > | > > selecting a particular value on a dropdown select field? Hoping for
    > | > > your immediate response.
    > | > >
    > | > >
    > | >
    > | > Are you talking about after the form is posted, or before? If it's
    > | > before then you need to look into some client side script, probably a
    > | > little javascript mixed with some CSS.
    > | >
    > | > If you're talking about a form that posts to itself, then you could

    do:
    > | > <% if request.form("selectboxvalue") = "whatevervalue" then %>
    > | > <input type="text" name="somename" id="someid" value="somevalue" />
    > | > <% else %>
    > | > <input type="hidden" name="somename" id="someid" value="somevalue" />
    > | > <% end if %>
    > | >
    > | > --
    > | > Adrienne Boswell
    > | > http://www.cavalcade-of-coding.info
    > | > Please respond to the group so others can share
    > |
    > |
    >
    A P, Jan 25, 2005
    #5
  6. A P

    Roland Hall Guest

    "A P" wrote in message news:...
    : What I mean was this, can I hide a textbox field including the row where
    the
    : field is located?

    Please post your responses inline or at the bottom.

    Does this help?
    http://kiddanger.com/lab/showhide2.html

    The white pants are on sale.

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp
    Roland Hall, Jan 25, 2005
    #6
    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. Sam Carleton

    Hidding information in ASP.Net

    Sam Carleton, Apr 6, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    352
    Kevin Spencer
    Apr 6, 2004
  2. Fabiano

    Hidding a template cell in a Datagrid

    Fabiano, Jun 1, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    442
    Eliyahu Goldin
    Jun 1, 2005
  3. Fabiano
    Replies:
    2
    Views:
    4,460
    Robert Smith
    Jul 16, 2005
  4. M. L. C.

    hidding and showing text

    M. L. C., Oct 23, 2004, in forum: Javascript
    Replies:
    1
    Views:
    88
    Martin Honnen
    Oct 23, 2004
  5. news.west.cox.net

    hidding div - showing div

    news.west.cox.net, Nov 21, 2004, in forum: Javascript
    Replies:
    5
    Views:
    139
    SimonFx
    Nov 21, 2004
Loading...

Share This Page