Ciao a tutti,
ho letto la guida http://www.html.it/pag/15201/onclick...sti-del-mouse/ ma non mi è stata utile per risolvere il seguente problema.
Il click sul tasto di reset azzera i campi, ma non agisce sul submit.
codice:
<script LANGUAGE="JavaScript">
function WritePageAndSQLAndSubmit(p,s)
{
//document.write("
WritePageAndSQLAndSubmit - PAG="+p+"
");
//document.write("
WritePageAndSQLAndSubmit - SQL_Domanda="+s+"
");
document.form1.pag.value=p;
document.form1.sql.value=s;
document.form1.submit();
}
function ResetSearchEngineFields()
{
document.form1.idareadomanda_selezionata.value = 0;
document.form1.tipodomanda_selezionato.value = '';
document.form1.idesame_selezionato.value = 0;
document.form1.submit();
}
</script>
seguito da:
codice:
<form method="post" name="form1" action="domandarisposta.asp?rnd=<%=random_number%>">
<div align="center">
<table border=0 class="table" width="40%">
<tr>
<td><fieldset>
<legend>Motore di ricerca</legend>
<div align="center">
<table border=0 class="table">
<tr valign="center">
<td align="center" width="50%">Unità Didattica</td>
<td align="center" width="50%">
<SELECT name="idareadomanda_selezionata">
<OPTION value="0">----- nessuna ------
<%While Not rec_area.EOF%>
<OPTION value="<%=rec_area("idareadomanda")%>" <%If strcomp(idareadomanda_selezionata,rec_area("idareadomanda"))=0 Then%> SELECTED<%End if%>><%=rec_area("areadomanda")%>
<%rec_area.MoveNext
Wend
rec_area.close%>
</SELECT>
</p>
</td>
</tr>
<tr valign="center">
<td align="center" width="50%">Tipo Domanda</td>
<td align="center" width="50%">
<input name="tipodomanda_selezionato" maxlength="50" size="20"<%If tipodomanda_selezionato <> undefined Then%> value="<%=tipodomanda_selezionato%>"<%End If%>>
</p>
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="sub" value="Invia Dati/Refresh"><input type="Button" value="Azzera Campi" onClick="ResetSearchEngineFields();"></td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>