venomdesign
Programmer
I have this wirtten but it doesn't work in netscape is there anyone that could help me with this. It is supposed to hide the select box when the one value is 7 but not hide whenever a value is other than 7. Works in IE but not netscape even though I scripted for both layers and IE.
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (document.layers)
var doc = 'document.', vis = '.visibility';
if (document.all)
var doc = 'document.all.', vis = '.style.visibility';
function show(object) {
if (document.layers || document.all)
eval(doc + object + vis + ' = "visible"');
}
function hide(object) {
if (document.layers || document.all)
eval(doc + object + vis + ' = "hidden"');
}
function hideAll() {
hide('roleSelect');
}
function showAll() {
show('roleSelect');
}
function checkhide() {
if (document.forms[0].dealid.value == 7) {
hideAll();
} else if (document.forms[0].dealid.value != 7) {
showAll();
}
}
//-->
</SCRIPT>
<STYLE type="text/css">
#roleSelect { position: absolute; }
</STYLE>
</head>
<body>
<form>
<select name="dealid" onchange="checkhide()">
<option value="23">23
<option value="7">7
<option value="63">63
</select>
</form>
<span id="roleSelect">
<form>
<select name="formId" multiple size="9" width="300" style="width:300px">
<option>dlgh
</select>
</form>
</span>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (document.layers)
var doc = 'document.', vis = '.visibility';
if (document.all)
var doc = 'document.all.', vis = '.style.visibility';
function show(object) {
if (document.layers || document.all)
eval(doc + object + vis + ' = "visible"');
}
function hide(object) {
if (document.layers || document.all)
eval(doc + object + vis + ' = "hidden"');
}
function hideAll() {
hide('roleSelect');
}
function showAll() {
show('roleSelect');
}
function checkhide() {
if (document.forms[0].dealid.value == 7) {
hideAll();
} else if (document.forms[0].dealid.value != 7) {
showAll();
}
}
//-->
</SCRIPT>
<STYLE type="text/css">
#roleSelect { position: absolute; }
</STYLE>
</head>
<body>
<form>
<select name="dealid" onchange="checkhide()">
<option value="23">23
<option value="7">7
<option value="63">63
</select>
</form>
<span id="roleSelect">
<form>
<select name="formId" multiple size="9" width="300" style="width:300px">
<option>dlgh
</select>
</form>
</span>