-
div tag
I have the following web page and it works great in IE but does not work in
netscape. Can anyone tell me what I am doing wrong.
Thanks,
<HTML>
<HEAD>
<TITLE>Layers with div</TITLE>
<script language="JavaScript">
<!--
var NN4 = document.layers? true : false;
var IE4 = document.all? true : false;
var isDom = document.getElementById? true : false;
function display() {
if (IE4) {
document.all['CancelReason'].style.visibility = "visible";
}else if(NN4) {
document.layers['CancelReason'].visibility = "show";
//document.layers['CancelReason'].style="visibility: show;";
}
}
function hide() {
if (IE4) {
document.all['CancelReason'].style.visibility = "hidden";
}else if(NN4) {
document.layers['CancelReason'].visibility = "hidden";
//document.layers['CancelReason'].style="visibility: hidden;";
}
}
// -->
</script>
</HEAD>
<BODY>
<form>
<div id="CancelReason" name="CancelReason">
<table width="90%" border="2" cellspacing="1">
<tr>
<td class="required" width="20%">Reason Canceled:</td>
<td>
<select name="whycanceled">
<option value="0">Because</option>
</select>
</td>
</tr>
</table>
</div>
<input type="radio" value="0" name="rdoResults" onclick="javascipt:hide('CancelReason')">hide
<input type="radio" value="1" name="rdoResults" onclick="javascipt:display('CancelReason')">display
</form>
</BODY>
</HTML>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks