Ciao a tutti. io ho in un file html una select di questo tipo:
<select name=choice size=1 onchange=go()>
<option value=uno>One</option>
<option value=due>Two</option>
<option value=tre>Three</option>
</select>
e una funzione js
function go(){
var choice = document.getElementById("choice").options[document.getElementById("choice").selectedIndex].value;
alert("choice = " + choice);
}
la risposta viene restituita corretta.
A questo punto ho bisogno di usare questa variabile per interrogare il database. Come posso realizzare questo passaggio nella funzione js?
Grazie
<select name=choice size=1 onchange=go()>
<option value=uno>One</option>
<option value=due>Two</option>
<option value=tre>Three</option>
</select>
e una funzione js
function go(){
var choice = document.getElementById("choice").options[document.getElementById("choice").selectedIndex].value;
alert("choice = " + choice);
}
la risposta viene restituita corretta.
A questo punto ho bisogno di usare questa variabile per interrogare il database. Come posso realizzare questo passaggio nella funzione js?
Grazie