JunorBot
Posts: 3
|
Posted: 05/30/2007, 5:53 AM |
|
hi All
I need help with hidding some controls in an html form. I have this code that works fine. The thing is if I hide on control I need the other one to display exactly at the same possion as the previous one. Is this posible.
<script type="text/javascript">
function changeIt() {
if(document.theform.chk.checked){
document.theform.textbox.style.visibility="hidden"; //set to visible
document.theform.selectname.style.visibility="visible"
}else{
document.theform.textbox.style.visibility="visible";
document.theform.selectname.style.visibility="hidden" //set to visible
}
}
</script>
</head>
<body>
<form name="theform">
<input type="checkbox" name="chk" value="" onclick="changeIt()">
<input type="text" name="textbox" style="visibility: visible">
<select name="selectname" style="visibility: hidden">
</form>
please help.
|
|
|
|