<script type=»text/javascript»>
<!–
function toggle_visibility(id) {
var e = document.getElementById(id);
if (document.getElementById(‘seguro’).checked == false)
{
document.getElementById(‘poliza’).style.visibility =’hidden’;
e.style.visibility = ‘hidden’;
}
else
{ e.style.visibility = ‘visible’;
document.getElementById(‘poliza’).style.visibility =’visible’;
}
}
</script>
Y en el html
<span class=»class»>Seguro</span><BR>
<label for=»seguro» accesskey=»18″ >
<INPUT name=»seguro» type=»checkbox» id=»seguro» tabindex=»18″ value=»si» onClick=»toggle_visibility(‘poliza’);» />
</label>
<br>
<span style=»visibility:hidden» id=»Poliza»> y Poliza</span><BR>
<label for=»compania» id=»compania» accesskey=»19″ class=»txt2″ >
<input name=»poliza» type=»text» style=»visibility:hidden;» id=»poliza» tabindex=»19″ />
</label>