PDA

View Full Version : DHTML not working in Netscape



rrhandle
12-19-2005, 05:11 PM
The code below works fine in IE, but not Netscape. Any help would be greatly appreciated.

Thanks.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html><!-- #BeginTemplate "/Templates/waterfall.dwt" --><!-- DW6 -->
<head>
<!-- #BeginEditable "doctitle" -->

<META NAME="Generator" CONTENT="TextPad 4.6">
<META NAME="Author" CONTENT="?">
<META NAME="Keywords" CONTENT="?">
<META NAME="Description" CONTENT="?">


<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../../styles/cbd_basic.css" type="text/css">
<!-- #BeginEditable "specialStylesheets" -->
<style type="text/css">
@import url(../../styles/cbd_adv.css);
</style>


<!-- ------------------------------------ -->
<!-- Floating menu START -->
<!-- ------------------------------------ -->
<style>

#divMenu {font-family:arial,helvetica; font-size:12pt; font-weight:bold}
#divMenu a{text-decoration:none;}
#divMenu a:hover{color:red;}




</style>
<script language="JavaScript1.2">
ie=document.all?1:0
n=document.layers?1:0
ns6=document.getElementById&&!document.all?1:0

lshow=15;
var move=10;
menuSpeed=40;
var moveOnScroll=true;
var ltop;
var tim=0;


function makeMenu(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
if (n) this.css=eval(nest+'document.'+obj)
else if (ns6) this.css=document.getElementById(obj).style
else if (ie) this.css=eval(obj+'.style')
this.state=1
this.go=0
if (n) this.width=this.css.document.width
else if (ns6) this.width=document.getElementById(obj).offsetWidth
else if (ie) this.width=eval(obj+'.offsetWidth')
this.left=b_getleft
this.obj = obj + "Object"; eval(this.obj + "=this")
}

function b_getleft(){
if (n||ns6){ gleft=parseInt(this.css.left)}
else if (ie){ gleft=eval(this.css.pixelLeft)}
return gleft;
}
function moveMenu(){
if(!oMenu.state){
clearTimeout(tim)
mIn()
}else{
clearTimeout(tim)
mOut()
}
}

function mIn(){
if(oMenu.left()>-oMenu.width+lshow){
oMenu.go=1
oMenu.css.left=oMenu.left()-move
tim=setTimeout("mIn()",menuSpeed)
}else{
oMenu.go=0
oMenu.state=1
}
}

function mOut(){
if(oMenu.left()<0){
oMenu.go=1
oMenu.css.left=oMenu.left()+move
tim=setTimeout("mOut()",menuSpeed)
}else{
oMenu.go=0
oMenu.state=0
}
}

function checkScrolled(){
if(!oMenu.go) oMenu.css.top=eval(scrolled)+parseInt(ltop)
if(n||ns6) setTimeout('checkScrolled()',30)
}

function menuInit(){
oMenu=new makeMenu('divMenu')
if (n||ns6) scrolled="window.pageYOffset"
else if (ie) scrolled="document.getElementsByTagName('html')[0].scrollTop"
oMenu.css.left=-oMenu.width+lshow
if (n||ns6) ltop=oMenu.css.top
else if (ie) ltop=oMenu.css.pixelTop
oMenu.css.visibility='visible'
if(moveOnScroll) ie?window.onscroll=checkScrolled:checkScrolled();
<% if session("POPUP") = vbFalse then response.write("moveMenu();")%>
}


window.onload=menuInit;

</script>
<!-- ------------------------------------ -->
<!-- Floating menu END -->
<!-- ------------------------------------ -->



<!-- #EndEditable -->
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td bgcolor="#509c5b" valign="top"><img src="../../graphics/template/masthead.jpg" width="600" height="85"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="1%" background="../../graphics/template/background_water.jpg">
<table width="128" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" colspan="3"><img src="../../graphics/template/browse_bg_top.jpg" width="128" height="12"></td>
</tr>
<tr>
<td rowspan="3" valign="top"><img src="../../graphics/template/browse_bg_left.jpg" width="13" height="357"></td>
<td><img src="../../graphics/template/menu2cap_top.gif" width="104" height="9"></td>
<td rowspan="3" valign="top"><img src="../../graphics/template/browse_bg_right.jpg" width="11" height="357"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><!-- #BeginLibraryItem "/Library/menu Browse.lbi" --><!--#include virtual="/includes/menu_browse.inc"-->
<!-- #EndLibraryItem --></td>
</tr>
<tr>
<td><img src="../../graphics/template/menu2cap_bottom.gif" width="104" height="9"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</td>
<td valign="top" width="1%" background="../../graphics/template/content_border_bg.gif"><img src="../../graphics/template/content_border_corner.gif" width="12" height="12"></td>
<td valign="top" width="98%" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="middle" background="../../graphics/template/menu1_background.gif"><!-- #BeginLibraryItem "/Library/menu Main.lbi" --><!--#include virtual="/includes/menu_top.inc"-->
<!-- #EndLibraryItem --></td>
</tr>
<tr>
<td align="left"><img src="../../graphics/template/content_border_corner_inside.gif" width="8" height="8"></td>
</tr>
</table>
<div class="mainContent">
<!-- #BeginEditable "Main Content" -->

<!-- ------------------------------------- -->
<!-- Add junk text so page can be scrolled -->
<!-- ------------------------------------- -->

<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>
<P>laksjdlf ljfl lkjs lkjf f lfjlkj lkj lkjl lkj f</P>



<!-- ------------------------------------- -->
<!-- Floating layer START -->
<!-- ------------------------------------- -->
<div id="divMenu" style="position:absolute; top:100px; left:35px; border-width:thin; border-style:solid; visibility:hidden; background-color:yellow">
<table align="left" >
<tr>
<td>
<img src="/graphics/catalog_popup/front_cover_comp8.jpg" alt="Front Cover" align="right">
</td>
<td>
</td>
<td align='center'>
<a href="javascript://" onMouseOver="moveMenu()" style="background-color:yellow;text-decoration:none; font-size: 8pt; color:red;">
F<BR>R<BR>E<BR>E<BR> <BR> <BR> <BR>
C<BR>A<BR>T<BR>A<BR>L<BR>O<BR>G<BR></a>
</td>
</tr>
<tr>
<td align="center">
<a href="/contact/request_brochure_mini_form.asp?source=PopUp" target="_blank"><img src="/graphics/catalog_popup/btn_yes.gif" border="0" alt="Yes!" /></a>
<img src="/graphics/catalog_popup/btn_no.gif" border="0" alt="No Thanks" onClick="moveMenu()"/>
<br>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</div>
<% if session("POPUP") = vbFalse then session("POPUP") = vbTrue else session("POPUP") = vbTrue %>
<!-- ------------------------------------- -->
<!-- Floating layer END -->
<!-- ------------------------------------- -->


<!-- #EndEditable -->
<div class="mainFooter">
<!-- #BeginLibraryItem "/Library/menu Footer.lbi" --><!--#include virtual="/includes/menu_footer.inc"--><!-- #EndLibraryItem --><!--#include virtual="/includes/copyright.inc"-->
</div>
</div>
</td>
</tr>
</table>




<!--#include virtual="/includes/masthead_links.inc"-->

<!-- #BeginEditable "beforeBodyClose" -->
<!--#include virtual="/includes/fastcounter_script.inc"-->
<!-- #EndEditable -->

</body>
<!-- #EndTemplate --></html>