Display textbox when specific selection is made in a select drop-down

Discussion in 'HTML' started by Daniel, Jul 12, 2007.

  1. Daniel

    Daniel Guest

    Hello,

    I have a select statement which includes a 'Other' option. I would
    like to know how to set it up so that if my user selects the 'Other'
    option that a textbox appear next to it so they can enter details.

    Thank you,

    Daniel
    Daniel, Jul 12, 2007
    #1
    1. Advertising

  2. Scripsit Daniel:

    > I have a select statement which includes a 'Other' option. I would
    > like to know how to set it up so that if my user selects the 'Other'
    > option that a textbox appear next to it so they can enter details.


    You can't do that in HTML. You can do it in JavaScript, but then you should
    take care of the functionality of the page when scripting is disabled. That
    is, you should include the textbox normally in HTML and use JavaScript (when
    enabled) to hide it until "Other" has been selected. More info:
    http://www.cs.tut.fi/~jkorpela/forms/combo.html

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
    Jukka K. Korpela, Jul 12, 2007
    #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. Karl Seguin
    Replies:
    3
    Views:
    2,279
    John Morgan
    Feb 10, 2004
  2. JamesW
    Replies:
    0
    Views:
    546
    JamesW
    Sep 11, 2006
  3. jaysch
    Replies:
    0
    Views:
    1,228
    jaysch
    Apr 30, 2011
  4. pk
    Replies:
    7
    Views:
    162
  5. Replies:
    3
    Views:
    277
Loading...

Share This Page