Ho provato a fare cosi:
Codice negli head:
codice:
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
<!-- Hide script from older browsers
function toggleCheck(thisField) {
if(document.nomeForm.categoria[0].checked){
alert('sito');
}
else if(document.nomeForm.categoria[1].checked){
alert('web');
}
else {
alert('scegli tra pubblico e privato!');
}
// End hiding script -->
</SCRIPT>
Codice del form:
codice:
<form action="risultatiRicerca.asp" method="get" name="tipue" target="_self" id="tipue">
<table width="186" cellpadding="0" cellspacing="0">
<tr>
<td align="left" class="testoContenuti"><input type="text" name="q" class="testoForm">
<input name="sito" type="radio" onclick="this.form.action='risultatiRicerca.asp';" value="sito" />
Cerca nel sito
<input name="sito" type="radio" onclick="this.form.action='http://www.google.it/custom';" value="web" />
Cerca nel web
<input type="submit" class="testoForm" value="Cerca"/>
</td>
</tr>
</table>
</form>
Stesso discorso ma se clicco "Cerca nel sito " mi da :
Infotrading&sito=sito (Infotrading è il termine di ricerca.