Another problem.
Is there something I am doing wrong? Let me paste the code because this is driving me nuts. I was looking at the pageresource.com site to get the hoverbuttons on my site working, then I added a layer and now Netscape doesn't change the image anymore.
I typed javascript: and the console gives this error: document[imgName] has no properties.
My code looks like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<SCRIPT language="JavaScript">
<!--hide
browserName=navigator.appName;
browserVer=parseInt(navigator.appVersion);
if ((browserName=="Netscape" && browserVer>=3) | | (browserName=="Microsoft Internet Explorer" && browserVer>=4))
version="n3";
else
version="n2";
if (version=="n3")
{
pic1on= new Image(100,25);
pic1on.src="images/b1h.gif";
pic2on= new Image(100,25);
pic2on.src="images/b2h.gif";
pic1off= new Image(100,25);
pic1off.src="images/b1n.gif";
pic2off= new Image(100,25);
pic2off.src="images/b2n.gif";
}
function lightup(imgName)
{
if (version=="n3")
{
imgOn=eval(imgName + "on.src");
document[imgName].src= imgOn;
}
}
function turnoff(imgName)
{
if (version=="n3")
{
imgOff=eval(imgName + "off.src");
document[imgName].src= imgOff;
}
}
//-->
</SCRIPT>
<STYLE TYPE="text/css">
<!--
#layer1 {
position:absolute;
top:0px;left:5px;z-index:2;
}
#layer2 {
position:absolute;
top:35px;left:5px;z-index:1;
}
-->
</STYLE>
<title>DocuMaxx</title>
</head>
<body topmargin="0" leftmargin="0" bgcolor=107300>
<DIV ID=layer1>
<A HREF="start.htm" target="main" onMouseover="lightup('pic1')" onMouseout="turnoff('pic1')"><IMG name="pic1" hspace="0" vspace="0" border="0" src="images/b1n.gif" width="140" height="30"></A>
</DIV>
<DIV id=layer2>
<A HREF="form.htm" target="main" onMouseover="lightup('pic2')" onMouseout="turnoff('pic2')"><IMG name="pic2" hspace="0" vspace="0" border="0" src="images/b2n.gif" width="140" height="30"></A>
</div>
</body>
</html>
Any ideas?
JM
Anonymous posted this at 02:02 — 30th November 1999.
They have: 5,633 posts
Joined: Jan 1970
Do you have a live example?
------------------
http://go.to/hass
jeffmich posted this at 14:55 — 30th November 1999.
They have: 4 posts
Joined: Nov 1999
Not that I can make public really.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.