/    Sign up×
Community /Pin to ProfileBookmark

Floting menu in Netscape and Mozilla

Dear,

I’m using the script floting menu and works great in IE but not in Netscape and Mozilla.

Can somebody help me please.

<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() {
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=”object1″;
yy=eval(y);
eval(dS+object+sD+v+yy);
setTimeout(“checkLocation()”,10);
}
// End –>
</script>

<BODY OnLoad=”setVariables();checkLocation()”>

<div id=”object1″ style=”position:absolute; visibility:show; left:0px; top:0px; z-index:2″>

<table width=130 border=0 cellspacing=20 cellpadding=0>
<tr>
<td><CENTER>Menu Bar</CENTER></td>
</tr>
<tr>
<td><a href=”../index.html” >Home Page</a></td>
</tr>
<tr>
<td><a href=”../new.html” >What’s New?</a></td>
</tr>
<tr>
<td><a href=”../forum/” >JavaScript Forum</a></td>
</tr>
<tr>
<td><a href=”../feedback.html” >Site Feedback</a></td>
</tr>
</table>
</div>

<table>
<tr>
<td width=130>
<font color=”white”> </font>
</td>

<td>

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@CharlesJul 03.2003 — [font=georgia]There's no need to resort to JavaScript. For Netscape, Mozilla, Opera and any other standards complient browser simply use CSS:[/font]

[font=monospace]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Example</title>

<style type="text/css">

<!--

#main {margin-left:150px}

#menu {position:fixed; top:0px; left:0px; width:150px}

#menu a {display:block}

-->

</style>

<div id="main"><h1>Crovephon opi eviscant</h1>

<h3>Vatue da ciranis</h3>

<p>Edusch adu po humue nip amops est. Votifit in escuscriant nimocro. Amapl, thalisnue eli mimalius avipant. Inaton in rihes ilonant. Asehes in oscritra apascruer.</p>

<h3>Avaphon al ituschuer</h3>

<p>Eplit smitenore bothont, ali tren enitrore osmaquorat. Iquorit rhevidrius itroprer, ba nosm tifebriem otroquidatis. Fispus rabrotis, iquorip matatheus cri rholali umepotis. Praquid dranipiem, scobr opoprum ma tosnam quoritirer. Quadil icihit quora asmeschore taspotis. Etedrius imuschonis, snit snofaspeus udi ipipiem ubruplotis.</p>

<p>Roquad de eg schifadrius agi diles est. Quoresp cipsi tin madriem laciplotis. Iplec iscocrue sne crelorhem oscostotis.</p>

<h3>Helacus su udetrat</h3>

<p>Liquid hofebum il obrerhon prirobr. Papismon acasconis, phipl nasili oh thahisp psunedatis. Aspec posp tonostem ola draloduer tri quorerubrant. Dreraf in hohitit beplatis. Psosepem sme od itretrius to egef est. Lofon, atafum og smoliphue aberhonis. Alen urhipho, perh spebogus bid ospapheus valibrant.</p>

<h3>Irherhatis</h3>

<p>Drep quoroletue etu crarorit mapeprant. Steps est. Muciem scest ih psopamem gotrat.</p>

<p>Uhaquad sminapius, smer iploquidem quide bribedem letoscrotis. Abaquor lanifum crivelotis, spe quidoph iginam piledonis.</p>

<h3>Cames</h3>

<p>Musetr lo gup amacrius is itonam est. Cedr bromos bulaquorant, ima phap crenuvit sabranis.</p>

<p>Enaspem li al ofaniem mu liveri est. Maquor est. Upost epeps plopisore uc bobuer ho papapsas. Vosta idinonis, rudr gotaspon bit efeniem icrusmonis. Erhan hegon, thocr isnitrius spi briguspius uloher. Tid la ofe ametore psi ocriquorem est. Requad vipapa mi tefurhon hepapanis.</p>

<p>Giquida niruscro, elesm psadescr er trihabrum miscrat. Tetr est. Rhim quoripep, atopr dopam hac mularem robibrer. Dranispam in opi rohim go drelodeus est. Drib imopsi, plil lamue uhi rhovici gomatis. Equidapleus, poniquadore ira pramatres apleprant.</p></div>


<div id="menu">

<div><h4>Menu Bar</h4>

<a href="../index.html" >Home Page</a>

<a href="../new.html" >What's New?</a>

<a href="../forum/" >JavaScript Forum</a>

<a href="../feedback.html" >Site Feedback</a>

</div>[/font]
Copy linkTweet thisAlerts:
@pyroJul 03.2003 — Take a look at http://www.infinitypages.com/research/staticmenu.htm for a cross browser way.
Copy linkTweet thisAlerts:
@CharlesJul 03.2003 — [i]Originally posted by pyro [/i]

[B]Take a look at http://www.infinitypages.com/research/staticmenu.htm for a cross browser way. [/B][/QUOTE]
[font=georgia]It's not exactly cross-browser if it doesn't work on the 13% of browsers that don't use JavaScript.[/font]
Copy linkTweet thisAlerts:
@pyroJul 03.2003 — True. If I get some time, I should rework it to behave as you suggested above for compliant browsers, and only use javascript to get the thing working in IE...
Copy linkTweet thisAlerts:
@kridisiauthorJul 04.2003 — I've put the CSS code into the page but iIt works great now in Mozilla but wont work in IE now.
Copy linkTweet thisAlerts:
@CharlesJul 04.2003 — [i]Originally posted by kridisi [/i]

[B]I've put the CSS code into the page but iIt works great now in Mozilla but wont work in IE now. [/B][/QUOTE]
[font=georgia]Well, yes, you have to view it in a browser that actually works. MSIE is a piece of dung.[/font]
Copy linkTweet thisAlerts:
@kridisiauthorJul 04.2003 — that's True. I've put a article on my site that the users better use Netscape or Mozilla.

Thanks for the response.

Greets
×

Success!

Help @kridisi 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 4.16,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...