I have this code:
<html>
<head>
<script>
function validarSenha(){
senha1 = document.f1.senha1.value
senha2 = document.f1.senha2.value
if (senha1 == senha2) {
alert("PASS OK");
document.getElementbyId("cadastro").style.visibility:"visible";
}
else
alert("PASS KO")
}
</script>
</head>
<body>
<form action="" name="f1">
Password : <input type="password" name="senha1" size="20">
<br>
Confirm Password: <input type="password" name="senha2" size="20">
<br>
<input type="button" value="Validar" onClick="validarSenha()">
</form>
<form action="#" method="post" name="cadastro" style="display:none">
</br><hr></br>
<fieldset class="grupo">
<div class="campo">
<label for="nome">Name</label>
<input type="text" id="nome" name="nome" style="width: 20em" value="" />
</div>
<div class="campo">
<label for="cro">CRO</label>
<input type="text" id="cro" name="cro" style="width: 5em" value="" />
</div>
</fieldset>
</form>
</body>
</html>
I need the FORM registration to appear when the password has been set.
I've tried with:
document.getElementbyId("cadastro").style.visibility:"visible";
but it does not work.