I am a newbie, and am trying to populate a select list with data from an array, based on a previous select list option. here is what i have so far....
<script language = Javascript>
var Acura = new Array();
Acura[0]='Cl';
Acura[1]='MDX';
Acura[2]='RL';
Acura[3]='RSX';
Acura[4]='TL';
var Audi = new Array();
Audi[0]='A4';
Audi[1]='A6';
Audi[2]='A8';
Audi[3]='AllRoad';
Audi[4]='RS6';
Audi[5]='S6';
Audi[6]='S8';
Audi[7]='TT';
var BMW = new Array();
BMW[0]='3 Series';
BMW[1]='5 Series';
BMW[2]='7 Series';
BMW[3]='M3';
BMW[4]='M5';
BMW[5]='X5';
BMW[6]='Z4';
BMW[7]='Z8';
</script>
I need to get the value of "ONE" of these arrays into another select list (make/model for cars...)
<form>
<select name="Make" onChange="???">
<option value=http://www.webdeveloper.com/forum/archive/index.php/"Acura">Acura</option>
<option value="Audit">Audit</option>
<option value="BMW">BMW</option>
</select>
<select name="Model">
need to add option for each item in array....
</select>
I have tried every imaginable combo with tutuorials, etc. I just keep getting errors...
I need to pass the value from the Make Select list to a function, then have the function fill the Model Select list with the values in the array NAMED THE SAME as the Make selectedINdex.value....
Any help would be great...
David
<script language = Javascript>
var Acura = new Array();
Acura[0]='Cl';
Acura[1]='MDX';
Acura[2]='RL';
Acura[3]='RSX';
Acura[4]='TL';
var Audi = new Array();
Audi[0]='A4';
Audi[1]='A6';
Audi[2]='A8';
Audi[3]='AllRoad';
Audi[4]='RS6';
Audi[5]='S6';
Audi[6]='S8';
Audi[7]='TT';
var BMW = new Array();
BMW[0]='3 Series';
BMW[1]='5 Series';
BMW[2]='7 Series';
BMW[3]='M3';
BMW[4]='M5';
BMW[5]='X5';
BMW[6]='Z4';
BMW[7]='Z8';
</script>
I need to get the value of "ONE" of these arrays into another select list (make/model for cars...)
<form>
<select name="Make" onChange="???">
<option value=http://www.webdeveloper.com/forum/archive/index.php/"Acura">Acura</option>
<option value="Audit">Audit</option>
<option value="BMW">BMW</option>
</select>
<select name="Model">
need to add option for each item in array....
</select>
I have tried every imaginable combo with tutuorials, etc. I just keep getting errors...
I need to pass the value from the Make Select list to a function, then have the function fill the Model Select list with the values in the array NAMED THE SAME as the Make selectedINdex.value....
Any help would be great...
David