How to populate a text box based on a preceding hyperlink

Discussion in 'ASP General' started by ziggs, Jul 2, 2003.

  1. ziggs

    ziggs Guest

    I have an asp form that has a text box called "colorBox". Just before
    text box is the word "Color" that is hyperlinked and will run the
    color.asp if pressed to show all of the colors in a predetermined 3
    character code. Ex., BLU for Blue.

    Now, what I'd like to do is have the user enter all of the data in the
    main asp form, ex. Name, address, etc. When they come to the
    "colorBox", they will be allowed to enter "BLU" by hand or click on
    the "Color" hyperlink just before the "colorBox" and show the list.
    From the list the user will pick one and that color will populate in
    the "colorBox".

    I don't want to use dropdown boxes, etc. I'm just using color as an
    example and I want the user to hit the database since the data changes
    from time to time.

    Any links to where this is shown on a website would be great. TIA
     
    ziggs, Jul 2, 2003
    #1
    1. Advertising

  2. ziggs

    Ken Schaefer Guest

    You can do this with client-side javascript.

    Use the hyperlink to open a new window that displays the options.

    When the user selects an option, use javascript to populate the text-box on
    the parent window with the appropriate value and (optionally) close the
    popup window.

    Cheers
    Ken

    "ziggs" <> wrote in message
    news:...
    : I have an asp form that has a text box called "colorBox". Just before
    : text box is the word "Color" that is hyperlinked and will run the
    : color.asp if pressed to show all of the colors in a predetermined 3
    : character code. Ex., BLU for Blue.
    :
    : Now, what I'd like to do is have the user enter all of the data in the
    : main asp form, ex. Name, address, etc. When they come to the
    : "colorBox", they will be allowed to enter "BLU" by hand or click on
    : the "Color" hyperlink just before the "colorBox" and show the list.
    : From the list the user will pick one and that color will populate in
    : the "colorBox".
    :
    : I don't want to use dropdown boxes, etc. I'm just using color as an
    : example and I want the user to hit the database since the data changes
    : from time to time.
    :
    : Any links to where this is shown on a website would be great. TIA
     
    Ken Schaefer, Jul 2, 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. TadPole
    Replies:
    0
    Views:
    434
    TadPole
    Nov 8, 2005
  2. njsimha
    Replies:
    0
    Views:
    785
    njsimha
    Sep 16, 2008
  3. Adrian
    Replies:
    1
    Views:
    227
    Bullschmidt
    Feb 18, 2004
  4. jnag
    Replies:
    2
    Views:
    302
    Nick Fletcher
    Feb 27, 2008
  5. Lewis
    Replies:
    1
    Views:
    205
Loading...

Share This Page