Questo è il codice:
codice:
<script >
function azienda(){
document.getElementById("rag").style.display="";
document.getElementById("piva").style.display="";
document.getElementById("privato").checked=false
}
function privato(){
document.getElementById("rag").style.display="none";
document.getElementById("piva").style.display="none";
document.getElementById("azienda").checked=false
}
</script>
<div style="width:540px; height:auto; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; text-align:center">
<div style="width:540px;"><? echo $registrazione;?></div>
<form name="prova" action="" method="post">
<div id="contreg" style="width:500px; #border:solid #000000 1px; text-align:center; height:100px; margin-left:auto; margin-right:auto; margin-top:20px;">
<div style="width:500px; float:left;">
<div style="width:180px; float:left; height:20px;"><? echo $cfa;?></div>
<div style="width:50px; float:left; margin-top:5px; height:20px; line-height:20px;"><? echo $azienda;?></div><div style="width:30px; float:left; margin-top:5px;"><input id="azienda" onClick="azienda()" name="azienda" type="radio" value="">
</div>
<div style="width:50px; float:left; margin-top:5px; height:20px; line-height:20px;"><? echo $privato;?></div>
<div style="width:30px; float:left; margin-top:5px;"><input id="privato" name="privato" type="radio" onClick="privato()" value="">
</div>
</div>
<div id="rag" style="display:none;"><div style="width:200; float:left; margin-top:5px;"><? echo $rag;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="rag" type="text" value="" size="35"></div></div>
<div id="piva" style="display:none;"><div style="width:200; float:left; margin-top:5px;"><? echo $piva;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="piva" type="text" value="" size="35"></div></div>
<div>
<div style="width:200; float:left; margin-top:5px;"><? echo $cf;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="cf" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $nome;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="nome" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $cognome;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="cognome" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $email;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="email" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $indirizzo;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="indirizzo" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $numerocivico;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="civico" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $comune;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="comune" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $cap;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="cap" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $provincia;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="provincia" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $telefono;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="telefono" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $fax;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="fax" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $password;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="password" type="text" value="" size="35"></div>
<div style="width:200; float:left; margin-top:5px;"><? echo $confermapassword;?></div><div style="width:250px; float:left; margin-top:5px;"><input name="password" type="text" value="" size="35"></div></div>
<div style="width:200; float:left; margin-top:20px; text-align:right; margin-bottom:20px;"><input name="privacy" type="checkbox" value="privacyok" /></div><div style="width:250px; float:left; margin-top:20px; margin-bottom:20px; text-align:left; height:20px; line-height:20px;"><? echo $privacy;?></div></div>
<div style="width:500; float:left; margin-top:5px;"><input name="registrati" type="submit" value="<? echo $registrati;?>"></div>
</div>
</form>
</div>
Se provate a togliere la riga <form....> tutto funziona come deve inserendola invece smette di funzionare