|
|
|
|
|
| | |
|
Active Server Pages ASP ASP.NET .aspx .ascx Web HTML Developer Internet Microsoft Web Services Visual Studio .NET CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Dynamic drop-down list box with contents from the database |
From: |
Bullschmidt |
Date: |
7/17/2001 11:43:52 AM |
IP: |
205.188.199.171 |
Some ways to do a dependent list box are the following:
1) Reload a self-posting form (disadvantage: form has to reload).
2) Send all the data down to the form and let JavaScript do the work (disadvantage: sends all the data to the form).
3) Remote scripting (disadvantage: may have security risks).
4) Hidden frames (disadvantage: complicated).
Data driven combo box with two FORMs example by Adrian Forbes
http://www.aspfree.com/authors/adrian/twocombotwoform.asp
Reloads the same page. Has PopulateListBox and RefreshPage subs.
Has demo to test. The demo takes awhile to refresh the page and doesn't put user back where was.
And here is another similar one by same author:
Two combos, one textbox example by Adrian Forbes
http://www.aspfree.com/authors/adrian/2Combo1Textbox.asp
Universal Related Popup Menus v 2.02
http://webreference.com/dev/menus/
Initially sends all data to the page and then lets JavaScript populate the second list box.
Has demo.
Cheap Tricks 2: A Dynamically-Linked Listbox
http://www.atgconsulting.com/doublelist.asp
Initially sends all data to the page and then lets JavaScript populate the second list box.
Says it has some unresolved Netscape quirks.
Has demo.
And similar but better one (improved code and 3 select boxes):
Cheap Tricks 4: A Triple-Linked Listbox
http://www.atgconsulting.com/triplelist.asp
<SCRIPT LANGUAGE="JavaScript">
function clearcombo(elem){
var i;
for (i = elem.options.length; i >= 0; i--) elem.options[i] = null;
elem.selectedIndex = -1;
} |
Previous Message
|
|

|
|
|
|
|
|
|
|
|
|