Automatic value for text box

Discussion in 'HTML' started by C. David Rossen, Sep 26, 2003.

  1. Does anyone know the best way to get an automatic value into a text box as a
    result of a selection made in a dropdown box? I have gotten javascript for
    this, but this does not suit my needs. The java code sets the value of the
    drop down box as the same as the text box, but I need the value to be
    different because the results of the form will be sent via email.

    For example, there is a drop down box listing classes someone can register
    for. Each class has a fee. The value of each option in the drop down is
    the name of the class. When someone chooses a class, the fee value
    automatically populates the fee text box. Any ideas how to do this while
    the value of the class can maintain its value?

    Thanks for any help...
    David
     
    C. David Rossen, Sep 26, 2003
    #1
    1. Advertising

  2. C. David Rossen

    Mark Parnell Guest

    C. David Rossen wrote:
    > Does anyone know the best way to get an automatic value into a text
    > box as a result of a selection made in a dropdown box? I have gotten
    > javascript for this, but this does not suit my needs. The java code


    Which one is it, Java or Javascript? They are 2 very different animals
    (apart from the unfortunate similarity in name). Presumably it is
    Javascript...

    > sets the value of the drop down box as the same as the text box, but


    ....if the user doesn't have Javascript enabled/available it doesn't do
    anything.

    > For example, there is a drop down box listing classes someone can
    > register for. Each class has a fee. The value of each option in the
    > drop down is the name of the class. When someone chooses a class,
    > the fee value automatically populates the fee text box. Any ideas
    > how to do this while the value of the class can maintain its value?
    >


    Why not just put the price into the drop down box as well?

    --

    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Sep 26, 2003
    #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. Guest
    Replies:
    1
    Views:
    791
    Guest
    Jun 29, 2004
  2. Gnarlodious
    Replies:
    4
    Views:
    17,704
    elizas
    May 5, 2010
  3. Replies:
    2
    Views:
    303
    Scott Roberts
    Dec 21, 2007
  4. C Barrington-Leigh
    Replies:
    0
    Views:
    280
    C Barrington-Leigh
    Apr 27, 2011
  5. Christopher Barrington-Leigh
    Replies:
    1
    Views:
    607
    Cousin Stanley
    Jun 29, 2011
Loading...

Share This Page