Ciao a tutti.
Ho una pagina asp che contiene il seguente script e relativo form.
E' la classica select dinamica.

Il problema è che funziona benissimo in IE 7 ma non funziona con Mozilla, Netscape e Safari.

Premetto che di javascript ne so veramente poco (tendente al nulla...): questo script l'ho trovato nella sezione script e l'ho modificato.

Cosa potrebbe essere ? E' una settimana che mi sto rompendo la testa....

<script type="text/javascript" language="JavaScript">
var regiondb = new Object()
regiondb["40"] = [{value:"01", text:"on the sea"},
{value:"02", text:"0-300 mt from the sea"},
{value:"03", text:"300-1000 mt from the sea"},
{value:"04", text:"more than 1 km from the sea"}];
regiondb["50"] = [{value:"05", text:"on the lake"},
{value:"06", text:"0-300 mt from the lake"},
{value:"07", text:"300-1000 mt from the lake"},
{value:"08", text:"more than 1 km from the lake"}];
regiondb["60"] = [{value:"09", text:"on the river"},
{value:"10", text:"0-300 mt from the river"},
{value:"11", text:"300-1000 mt from the river"},
{value:"12", text:"more than 1 km from the river"}];
regiondb["70"] = [{value:"13", text:"100-500 mt above sea level"},
{value:"14", text:"500-1000 mt a.s.l."},
{value:"15", text:"1000-1500 mt a.s.l."}];
regiondb["80"] = [{value:"16", text:"1500-2000 mt above sea level"},
{value:"17", text:"2000-3000 mt a.s.l."},
{value:"18", text:"more than 3000 mt a.s.l."}];
regiondb["90"] = [{value:"19", text:"Not specified"}],

function setCities(chooser) {
var newElem;
var where = (navigator.appName == "Microsoft Internet Explorer") ? -1 : null;
var cityChooser = chooser.form.elements["citta"];
while (cityChooser.options.length) {
cityChooser.remove(0);
}
var choice = chooser.options[chooser.selectedIndex].value;
var db = regiondb[choice];
newElem = document.createElement("option");
newElem.text = "Select a distance/elevation:";
newElem.value = "";
cityChooser.add(newElem, where);
if (choice != "") {
for (var i = 0; i < db.length; i++) {
newElem = document.createElement("option");
newElem.text = db[i].text;
newElem.value = db[i].value;
cityChooser.add(newElem, where);
}
}
}
</script>


<form name="globe" method="POST" action="/modifyDBcompany_location.asp">




<label for="Location">Sited on the:</label>
<select name="situato" onchange="setCities(this)">
<option value="" selected="selected">Select:</option>
<option value="40">Sea</option>
<option value="50">Lake</option>
<option value="60">River</option>
<option value="70">Plain/Hill</option>
<option value="80">Mountain</option>
<option value="90">Not specified</option>
</select>_
</p>




<label for="Location">Distance/elevation:</label>
<select name="citta" >
<option value="" selected="selected">Select a distance/elevation:</option></select>_
</p>

</form>