Il codice funziona perfettamente con firefox, google chrome e safari ma non ne vuole sapere con internet explorer. Cliccando sulla prima select non appare la seconda. Il codice è il seguente:
E qui è dove richiamo le funzioni:codice:function regioni(s) { var city = document.getElementById("city"); sel_city = document.forms['register'].cities.options; prov = document.forms['register'].prov.options; if (s.options[s.selectedIndex].selected) { city.style.display="table-row"; } k=0; for (i=0; i<107; i++) { sel_city[i]=null; if(s.options[s.selectedIndex].value==prov[i].value) { sel_city[k] = new Option(prov[i].text,prov[i].label); k++; } } if (sel_city[sel_city.selectedIndex].text==sel_city[0].text) { country.style.display="none"; } } function citta(s) { var country = document.getElementById("country"); sel_country = document.forms['register'].countries.options; com = document.forms['register'].com.options; if (s.options[s.selectedIndex].selected) { country.style.display="table-row"; } k=0; for (i=0; i<8082; i++) { sel_country[i]=null; if(s.options[s.selectedIndex].value==com[i].value) { sel_country[k] = new Option(com[i].text,com[i].value); k++; } } }
Cosa c'è che non va?codice:<select onChange="regioni(this)" onFocus="regioni(this)">{$REGIONI_LIST}</select> <select name="cities" onChange="citta(this)" onFocus="citta(this)"></select>

Rispondi quotando