|
-
Jul 13th, 2001, 02:54 PM
#1
Thread Starter
Hyperactive Member
Populating textboxes based on dropdown listbox selection
Hi everyone!
I need your help yet again. I have a web page with a listbox and five textboxes. I need for the page to do this: Once the user selects an option from the listbox, the textboxes populate with data relevant to the selection. For example, the listbox has a list of names and when the user picks a name, the textboxes below populate with the address, city, zip, phonenumber, and email address linked to that specific name.
Any ideas out there? Also, I would love some sample code. Thanks in advance. Enjoy your weekend.
-vbuser1976 
VB6 Enterprise SP6
SQL 7.0 SP2
VBScript, HTML, Javascript, C++, a little UNIX
-
Jul 13th, 2001, 05:17 PM
#2
If you are doing it on the server, you could always pass the name to the query string (or better yet, a unique ID for the name) and then use ASP to get the info from your database.
You could also use XML to store everyones info, then parse the XML on the client (or the server).
I am sure there are other ways, but those are 2 off the top of my head.
-
Jul 14th, 2001, 04:15 AM
#3
Frenzied Member
Assuming your dealling with a relatively small set of data, you can write the data into client side arrays that you then use to populate the input values in the select tag's onChange event.
If you dataset is on the large side, you will probably want to do as CMangano suggested and pass a querystring back to the same page and modify your query based on it then reload the page. It means another server hit, but it keeps a very large web page from needing to be downloaded.
Client side XML is only an option if your target browser is IE5+ and a Win32 platform.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|