torontozfinest
Technical User
Hey Folks,
Im trying to make a textbox appear when a particular option is selected with a select input. I need compatibility between entscape and IE 6 (intranet). It works fine in explorer but when I try accessing the code in netscape only the text labels to the textboxes show up and not the textboxes themselves. Can anyone give me assistance (hopefully without changing the code to drastically) THANKS IN ADVANCE. GREAT FORUM.
Here is the code:
<HTML>
<head>
<script language='javascript'>
function showhide(objSelect){
if (objSelect.options[objSelect.selectedIndex].value == "test"{
if(document.layers){
document.hideshow.visibility = 'visible';
}
else{
document.getElementById('hideshow').style.visibility = 'visible';
}
}
else{
if(document.layers){
document.hideshow.visibility = 'hidden';
}
else{
document.getElementById('hideshow').style.visibility = 'hidden';
}
}
}
</script>
<title>
Incoming
</title>
</head>
<body background = #FFFFFF text=#0000FF>
<form>
<table border=1 width=950 height=800 align=center cellspacing=0 cellpadding=0>
<tr><td>
<select name=test id=test onChange='showhide(this)'>
<option>eatesatstest</option>
<option value=test>eatesatste</option>
<option>test</option>
</select>
<div name='hideshow' ID='hideshow' style='visibility:hidden;position:relative'>
Input number : <input type=text name=blah><br>
Input Code : <input type=text name=blah><br>
</div>
</td></tr>
</table>
</form>
</body>
</HTML>
Im trying to make a textbox appear when a particular option is selected with a select input. I need compatibility between entscape and IE 6 (intranet). It works fine in explorer but when I try accessing the code in netscape only the text labels to the textboxes show up and not the textboxes themselves. Can anyone give me assistance (hopefully without changing the code to drastically) THANKS IN ADVANCE. GREAT FORUM.
Here is the code:
<HTML>
<head>
<script language='javascript'>
function showhide(objSelect){
if (objSelect.options[objSelect.selectedIndex].value == "test"{
if(document.layers){
document.hideshow.visibility = 'visible';
}
else{
document.getElementById('hideshow').style.visibility = 'visible';
}
}
else{
if(document.layers){
document.hideshow.visibility = 'hidden';
}
else{
document.getElementById('hideshow').style.visibility = 'hidden';
}
}
}
</script>
<title>
Incoming
</title>
</head>
<body background = #FFFFFF text=#0000FF>
<form>
<table border=1 width=950 height=800 align=center cellspacing=0 cellpadding=0>
<tr><td>
<select name=test id=test onChange='showhide(this)'>
<option>eatesatstest</option>
<option value=test>eatesatste</option>
<option>test</option>
</select>
<div name='hideshow' ID='hideshow' style='visibility:hidden;position:relative'>
Input number : <input type=text name=blah><br>
Input Code : <input type=text name=blah><br>
</div>
</td></tr>
</table>
</form>
</body>
</HTML>