cosi funziona
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>DWS - Javascript</title>
<script language="javascript">
function contacheckbox(){
if(!document.form1.scelta_1.checked && !document.form1.scelta_2.checked){
alert("Attenzione\n non hai selezionato nessuna scelta!!!");
return false;
}
}
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<form name="form1" method="post" action="" onSubmit="return contacheckbox();">
<table width="437" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80"> </td>
<td width="357"><table width="328" border="0" cellspacing="2" cellpadding="0">
<tr>
<td><input type="checkbox" name="scelta_1" value="checkbox">
scelta 1 </td>
</tr>
<tr>
<td><input type="checkbox" name="scelta_2" value="checkbox">
scelta 2 </td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>
</body>
</html>