Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Formfields from dropdown

Status
Not open for further replies.

PaulSc

MIS
Aug 21, 2000
148
GB
Hi,
I'm after some help again please.....

I have a single drop down box, populated from a database. When the user selects some data from it (It is a name of the person they want a email sent to), I need to be able to go to the database and get 2 other bits of info and populate two other textboxes on the form (i.e telephone num & department)

I've tried various methods, but cant really find one that suits my needs.

If possible, I would prefer to do this client side as I have other data on the form that is being cleared when the form is resubmitted but the original dropdown could contain anything between 1 and 100 names so hardcoding is not really an option either.

can anybody help??

Regards and Thanks
PaulSc.
 
How's your javascript? :eek:

You'll be best off filling a javascript array on-the-fly using asp. This javascript array will contain all possible telephone numbers and departments. Then you use javascript form handling to make the switch when a user selects something. It's not actually as daunting as it sounds.

I'm trying to dig out an old example of this for you... if I find it I'll post it here.

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top