tunGsten
asked on
Hierarchical dropdownlist
Hi all,
I need to display several informations coming from an Access DB but the display must appear according a hierarchical design.
For instance, I have a first dropdownlist and if I choose "Financial Area" , a second dropdownlist just comes below with the "Financial clients". And if i choose a client from this list, a short description appears in a textarea or an iframe...
Financial Area ->
Financial Clients -> (not visible until Financial Area has been chosen)
Clients description (iframe or textarea)
I would like to make it in ASP or .NET
Your Xpert help is welcome !
I need to display several informations coming from an Access DB but the display must appear according a hierarchical design.
For instance, I have a first dropdownlist and if I choose "Financial Area" , a second dropdownlist just comes below with the "Financial clients". And if i choose a client from this list, a short description appears in a textarea or an iframe...
Financial Area ->
Financial Clients -> (not visible until Financial Area has been chosen)
Clients description (iframe or textarea)
I would like to make it in ASP or .NET
Your Xpert help is welcome !
ASKER
Yeah, it's a nice idea....but it's a javascript...
I don't want to type all my db content in a script....
but thanks anyway ;-)
I don't want to type all my db content in a script....
but thanks anyway ;-)
ASKER
Yeah, it's a nice idea....but it's a javascript...
I don't want to type all my db content in a script....
but thanks anyway ;-)
I don't want to type all my db content in a script....
but thanks anyway ;-)
Optgroup.
http://www.w3.org/TR/html4/interact/forms.html#h-17.6
How browsers render it is up to the browser, some use an expanding menu form.
http://www.w3.org/TR/html4/interact/forms.html#h-17.6
How browsers render it is up to the browser, some use an expanding menu form.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
tunGsten,
Try to check the link below... might help...
https://www.experts-exchange.com/questions/20458348/dynamic-dropdown-listboxs-extracted-from-database.html
Try to check the link below... might help...
https://www.experts-exchange.com/questions/20458348/dynamic-dropdown-listboxs-extracted-from-database.html
ASKER
Thanks for the help. It already gives me a good point to start
<html>
<head>
<title>Dynamic JS Dropdowns</title>
<script language="JavaScript1.2">
var oList= new Object();
oList["A"] = ["A1","A2", "A3","A4"];
oList["B"] = ["B1","B2", "B3","B4"];
oList["C"] = ["C1","C2", "C3","C4"];
function createSelect(obj,sID)
{
var oTarget = document.forms['formName']
var sValue = obj.options[obj.options.se
if (oList[sValue])
{
addOptions(oTarget, oList[sValue]);
}
}
function addOptions(oSelect, arrList)
{
var iLen = oSelect.options.length;
for (var i=0;i<iLen;i++)
{
oSelect.options[0] = null;
}
var iLen = arrList.length;
for (var i=0;i<iLen;i++)
{
oSelect.options[oSelect.op
}
}
</script>
</head>
<body>
<form id="formName">
OPTIONS
<select name="selectBorder" onchange="createSelect(thi
<option>-- select --</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="B">C</option>
</select>
<select name="selectColour">
</select>
</form>
</body>
</html>