/    Sign up×
Community /Pin to ProfileBookmark

sliding menu works in IE, but not in Safari

Any tips as to why this works in IE, but not in Safari.
I have not tested on Windows.

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”
http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd“>
<html lang=”en”>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=iso-8859-1″>
<title>Untitled</title>
<meta name=”generator” content=”BBEdit 6.1.2+”>
<!– script from [url]http://www.verticalsoftware.co.uk/slide.htm[/url] –>
<style type=”text/css”>
#menuOut, #menuIn
{
position:absolute;
left: -161px;
width:180px;
top:60px;
border:1.5px solid yellow;
background-color: beige;
layer-background-color: red;
font: bold 12px Verdana;
color: #ffffff;
line-height: 20px;
padding: 10px;
padding-left: 15px;
line-height: 110%;
}
a:link {font: bold 12px arial; color: #004891; text-decoration: none;}
a:visited {font: bold 12px arial; color: #004891; text-decoration: none;}
a:hover {font: bold 12px arial; color: #004891; text-decoration: underline;}
</style>
</head>
<body>
<div style=”width: 500px;”>
<script language=”JavaScript”>
<!– hiding
if (document.all)
document.write(‘<div id=”menuIn” style=”left:-161″ onMouseover=”pull()” onMouseout=”draw()”>’)
// End hiding–>
</script>
<layer id=”menuOut” onMouseover=”pull()” onMouseout=”draw()”>
<script language=”JavaScript”>
<!– Begin
var siteName = new Array();
var siteLink = new Array();
siteName[0] = “&middot; &nbsp;Home”;
siteName[1] = “&middot; &nbsp;Hosting and Domains”;
siteName[2] = “&middot; &nbsp;Web Tools and Services”;
siteName[3] = “&middot; &nbsp;Developer Resources”;
siteName[4] = “&middot; &nbsp;Help”;
siteName[5] = “&middot; &nbsp;Site Map”;
siteLink[0] = “http://www.bravenet.com“;
siteLink[1] = “http://www.bravenet.com/webhosting/index.php“;
siteLink[2] = “http://www.bravenet.com/webtools/index.php“;
siteLink[3] = “http://www.bravenet.com/resources/index.php“;
siteLink[4] = “http://www.bravenet.com/help/index.php“;
siteLink[5] = “http://www.bravenet.com/global/sitemap.php“;
for (i = 0; i <= siteName.length – 1; i++)
document.write(‘<a href=’ + siteLink[i] + ‘>’ + siteName[i] + ‘</a><br>’);
// End –>
</script>
</layer>
<script language=”JavaScript”>
<!– Begin
function regenerate() {
window.location.reload();
}
function regenerate2() {
if (document.layers)
setTimeout(“window.onresize=regenerate”, 400);
}
window.onload = regenerate2;
if (document.all) {
document.write(‘</div>’);
slideMenu = document.all.menuIn.style;
boundryR = 0;
boundryL = -161;
}
else {
slideMenu = document.layers.menuOut;
boundryR = 161;
boundryL = 10;
}
function pull() {
if (window.drawMenu)
clearInterval(drawMenu);
pullMenu = setInterval(“pullEngine()”, 50);
}
function draw() {
clearInterval(pullMenu);
drawMenu = setInterval(“drawEngine()”, 50);
}
function pullEngine() {
if (document.all && slideMenu.pixelLeft < boundryR)
slideMenu.pixelLeft += 5;
else if(document.layers && slideMenu.left < boundryR)
slideMenu.left += 5;
else if (window.pullMenu)
clearInterval(pullMenu);
}
function drawEngine() {
if (document.all && slideMenu.pixelLeft > boundryL)
slideMenu.pixelLeft -= 5;
else if(document.layers && slideMenu.left > boundryL)
slideMenu.left -= 5;
else if (window.drawMenu)
clearInterval(drawMenu);
}
// End –>
</script>
</body>
</html>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@CrazyMerlinDec 13.2005 — go to the safari developer site and find out if it adheres to the W3CDOM or if it differs slightly

and speed it up by about half. It is slow on a standard browser, if someone is running a high use machine it will be sluggish as hell, and they will be screaming
×

Success!

Help @squi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...