salve a tutti ho una funzione che dovrebbe riempire un input di tipo text
<select name="comune" id="comune" onChange="stampaComune()">
function stampaComune(){
var sel=document.getElementById('comune');
var testo = sel.options[sel.selectedIndex].text;
document.getElementById('nomecomune').value = testo;
}
l'errore che ricevo è
options è nullo o non è un oggetto
può dipendere dal fatto che la select viene generata utilizzando un file php richiamato tramite ajax ?
noto che su firefox funziona correttamente
solo su IE mi spara quel problema

Rispondi quotando
