i need to initialize these 2 double drop-down menu:
but works only first one, if i had only first i had no problem, but with 2 first one doesn’t work…
i hope i showed enought code.
[code=html]
<label>Model:</label>
<select name=”CarModelID” style=width:160px onchange=”advanced_search();”>
</select>
<script language=”javascript”>
<!–
// select the submitted brand
for (i=0;i<document.searcher.BrandID.options.length;i++) {
if (document.searcher.BrandID.options[i].value == ‘7’)
{
document.searcher.BrandID.options[i].selected=true;
break
}
}
//initialize status
chooseModel(document.searcher);
// select the submitted model
for (i=0;i<document.searcher.CarModelID.options.length;i++) {
if (document.searcher.CarModelID.options[i].value == ’76’)
{
document.searcher.CarModelID.options[i].selected=true;
break
}
}
–>
</script>
Model #2:
<select name=”CarModelID2″ style=width:155px>
</select>
<script language=”javascript”>
<!–
// select the submitted brand
for (i=0;i<document.searcher.BrandID2.options.length;i++) {
if (document.searcher.BrandID2.options[i].value == ‘9’)
{
document.searcher.BrandID2.options[i].selected=true;
break
}
}
//initialize status
chooseModel2(document.searcher);
// select the submitted model
for (i=0;i<document.searcher.CarModelID2.options.length;i++) {
if (document.searcher.CarModelID2.options[i].value == ’98’)
{
document.searcher.CarModelID2.options[i].selected=true;
break
}
}
–>
</script>