Questo funziona
codice:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Form</title>
<script language="Javascript">
<!--
function veditarga() {
var rad = document.getElementsByName('radio');
if (rad[0].checked){
document.getElementById("invia").disabled=false
//document.getElementById("automezzi").disabled=true
//document.getElementById("automezzir").disabled=true
document.getElementById('targa').style.display="block";
} else {
document.getElementById("invia").disabled=true
//document.getElementById("automezzi").disabled=false
//document.getElementById("automezzir").disabled=false
document.getElementById('targa').style.display="none";
}
}
function check()
{
/*if (document.form.automezzi.value == 0){
alert("ATTENZIONE: INSERIRE UNA TARGA AUTOMEZZI");
return false;
}*/
if (document.getElementById('targa').style.display == "block" && document.getElementById('targamotricem').value == "" && document.getElementById('targarimorchiom').value == ""){
alert("Inserire almeno una targa.");
return false;
}
}
//-->
</script>
<style type="text/css">
#box {
width: 100px;
height: 100px;
background: #ccc
}
</style>
</head>
<body>
<div id="targa" STYLE="position:absolute; display:none; height:100; width:500px; left: 50px; top: 50px">
<table width="600" border="0" cellpadding="0" cellspacing="0" class="selezione">
<tr>
<td width="350">TARGA MOTRICE </td>
<td width="250"><input name="targamotricem" type="text" id="targamotricem" size="8" maxlength="8"></td>
<td width="350">TARGA RIMORCHIO </td>
<td width="250"><input name="targarimorchiom" type="text" id="targarimorchiom" size="8" maxlength="8"></td>
</tr>
</table>
</div>
<input type="radio" name="radio" id="none" value="none" onclick="veditarga()">chiudi
<input type="radio" name="radio" id="block" value="block" onclick="veditarga()">mostra
<input name="invia" type="button" id="invia" value="verifica" onclick="check()" disabled>
</body>
</html>
studiandotelo un attimo sicuramente saprai modificare per integrarlo nella tua pagina.