Forum Moderators: open
The script is external and is called with:
<script type="text/javascript" language="Javascript"> function Go(){return} </script>
<script type="text/javascript" src="nsmenu_var.js"></script>
<script type="text/javascript" src="menu_com.js"></script>
The DOCTYPE is:
<!DOCTYPE html <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
As always, your guidance is most appreciated.
<html> <body bgcolor="#FFFFFF" text="#000000"> function Go(){return} </script>
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="blah blah" />
<meta name="description" content="blah blah" />
<link rel="stylesheet" href="dki.css" type="text/css" />
</head>
<script type="text/javascript" language="Javascript">
<script type="text/javascript" src="nsmenu_var.js"></script>
<script type="text/javascript" src="menu_com.js"></script>
<noscript>Your browser does not support script</noscript>
</body>
</html>
I just noticed something - I didn't include the DOCTYPE. When I add this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
it doesn't work in NN6 (still ok in MSIE though).
<script type="text/javascript" src="nsmenu_var.js"></script> function Go(){return} </script>
<script type="text/javascript" src="menu_com.js"></script>
<script type="text/javascript" language="Javascript">
Without seeing the originals (XHTML or scripts), I can't think of anything else immediately.
When you put a doctype on menu.htm, the menu is being constructed by the javascript and is actually there. However, for some reason the values for the size and positioning properties (width, height, top, left, etc.) are getting scragged in Mozilla/Netscape.
As a result, when Gecko (the rendering engine) renders the output of the script, the computed style values for size and positioning values are all screwed up (width of 0px or 0.666667px, for example), and the menu isn't visible (although it is there).
As an aside, I noticed in MSIE 6 that the positioning of the submenus is getting also getting hosed when you add a DOCTYPE.
So ... the problem is in the menu_com.js file and the way it is constructing and rendering the menu. Alas, this is a very complex js -- too complex for my small brain to debug in the time I have available. I'd suggest either:
BTW moonbiter - I love your profile image!
The author wrote me back and noted that he agreed and supplied me a link to the updated version in which he had fixed the problem. So... I think the problem may be solved.