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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drop down box which updates text area

Status
Not open for further replies.

antdickens

Programmer
Nov 13, 2001
129
GB
I am tring to have a list of contacts on a page. I thought the best way to display them would be to use a drop down box which when a contact is selected from the drop down a text area would be updated with their full contact details.

Could anybody give me any pointers as to whether or not this is possible and how to go about getting started???


Cheers
 
Where are you getting the data from? Is it delivered by server-side code from a dabatase, LDAP server, etc, or are you just going to hard-code the details on the page (in a JS array, etc)?

If the former, then you might consider delivering just the names to the page (to populate the drop-down), and then doing a call to the server (after the user makes a selection) to retrieve the rest of the details.

If the latter, then you could populate the select box from the array, avoid any hits on the server, but of course, this means that all data has to be delivered to the page - which could prove costly (in terms of bandwidth) if a user is only likely to select one name... Of course, this depends on how many names you have in your system.

Maybe you could tell us things like:

- How many names (roughly) you intend on displaying
- Roughly how much data is in the "full contact details"
- Whether you have access to any server-side languages / databases

Hope this helps,
Dan
 
2 ways:
1. ASP, resubmit the page when the user selects the option from the dropdown (neat method)

2. Take all the values and store them in a javascript array. and call the array that u want in the onchange event...

Known is handfull, Unknown is worldfull
 
Thanks for responses. I originally intended to have all the data contained on the page. After a little thought on how to make the list maintainable i have decided that this needs to be done with a maintanable database.

So i am going to use Perl as i am more familiar with this language

Thanks for replies all the same
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top