How to populate a text box based on a preceding hyperlink

Z

ziggs

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
 
K

Ken Schaefer

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

: 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top