I’m trying to get a scrolling menu on my site to be compatible with IE, Netscape, and AOL browsers.
So far it seems to only work in IE. Any suggestions on what I can do to get it working with all three?
[b]JavaScript for scrolling menu:
[code]
<script language=”JavaScript”>
<!– This script and many more are available free online at –>
<!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>
<!– Begin
function setVariables() {
var BrowserType = navigator.userAgent;
if (BrowserType.indexOf(“MSIE”) != 25) {
//if (navigator.appName == “Netscape”) {
v=”.top=”;
dS=”document.”;
sD=””;
y=”window.pageYOffset”;
}
else {
v=”.pixelTop=”;
dS=””;
sD=”.style”;
y=”document.body.scrollTop”;
}
}
function checkLocation() {
object=”chimenu”;
yy=eval(y) + 90;
eval(dS+object+sD+v+yy);
setTimeout(“checkLocation()”,10);
}
// End –>
</script>
[b]Load event handlers when page body loads:
[code]
<body OnLoad=”setVariables();checkLocation()”>
[b]PHP code which prints division containing actual menu:
[code=php]
print(“<table border=0 width=”925″ align=”center”>n”); // begins page table
print(“<tbody>n<tr>n<td width=”200″ align=”left” valign=”top”>n”); // begins navigation cell
print(“<div id=”chimenu” style=”position:absolute; visibility:show; left:50px; top:0px; z-index:2″>n<table border=0 cellpadding=0>n<tbody>n<tr>n<td>n”); // sets division for portable menu
require(“navbar.php”); // includes navbar
print(“</td>n</tr>n</tbody>n</table>n</div>n”); // ends division