• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Image Rollovers won't work

Tutruk

Limp Gawd
Joined
Sep 6, 2002
Messages
160
I have no clue what I'm doing with these rollovers and I'm learning as I go with this... can anyone help? I get no errors.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="scripts/scripts.js"></script>
<script language="javascript">
level = 0;

//Preload All Images
if (document.images)
{
	//Load the button off images
	contactOff = new Image();
	contactOff.src = "images/nav/senior/contact.jpg";
	contactOn = new Image();
	contactOn.src = "images/nav/senior/contact1.jpg";
	aboutOff = new Image();
	aboutOff.src = "images/nav/senior/about.jpg";
	aboutOn = new Image();
	aboutOn.src = "images/nav/senior/about1.jpg";
	copyrightOff = new Image();
	copyrightOff.src = "images/nav/senior/copyright.jpg";
	copyrightOn = new Image();
	copyrightOn.src = "images/nav/senior/copyright1.jpg";
	sourceOff = new Image();
	sourceOff.src = "images/nav/senior/source.jpg";
	sourceOn = new Image();
	sourceOn.src = "images/nav/senior/source1.jpg";
	herfdnOff = new Image();
	herfdnOff.src = "images/nav/senior/herfdn.jpg";
	herfdnOn = new Image();
	herfdnOn.src = "images/nav/senior/herfdn1.jpg";
	homeOff = new Image();
	homeOff.src = "images/nav/senior/home.jpg";
	homeOn = new Image();
	homeOn.src = "images/nav/senior/home1.jpg";
	infoOff = new Image();
	infoOff.src = "images/nav/senior/infomatic1.jpg";
	infoOn = new Image();
	infoOn.src = "images/nav/senior/infomatic.jpg";
	multimediaOff = new Image();
	multimediaOff.src = "images/nav/senior/multimedia1.jpg";
	multimediaOn = new Image();
	multimediaOn.src = "images/nav/senior/multimedia.jpg";
	activitiesOff = new Image();
	activitiesOff.src = "images/nav/senior/activities1.jpg";
	activitiesOn = new Image();
	activitiesOn.src = "images/nav/senior/activities.jpg";


}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="scripts/style.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#B6D3BA" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  <table width="818" border="0" align="center" cellpadding="0" cellspacing="0" id="bottom">
  <tr>
    <td width="168" height="98"><img src="images/nav/senior/home.jpg" alt="Home" name="home" border="0" usemap="#homeMap" id="home" width="168" height="98"></td>
		<td width="131" height="98"><img src="images/nav/senior/about.jpg" name="about" border="0" usemap="#aboutMap" id="about" width="131" height="98" alt="About us"></td>
		<td width="133" height="98"><img src="images/nav/senior/contact.jpg" name="contact" border="0" usemap="#contactMap" id="contact" width="133" height="98" alt="Contact us"></td>
		<td width="123" height="98"><img src="images/nav/senior/copyright.jpg" name="copyright" border="0" usemap="#copyrightMap" id="copyright" width="123" height="98" alt="Copyright"></td>
		<td width="112" height="98"><img src="images/nav/senior/source.jpg" name="source" border="0" usemap="#sourceMap" id="source" width="112" height="98" alt="hwhw"></td>
		<td width="151" height="98"><img src="images/nav/senior/herfdn.jpg" name="herfdn" border="0" usemap="#herfdnMap" id="herfdn" width="151" height="98" alt="ewhwh"></td>
  </tr>
</table>
  <map name="homeMap" id="homeMap">
	<area onMouseOver="Switch('home','homeOn')" onMouseOut="Switch('home','homeOff')" shape="rect" coords="14,27,135,79" href="index.htm" alt="Home"></map>
<map name="copyrightMap">
   <area shape="rect" coords="11,44,95,74" href="copyright.htm" alt="copyright" onMouseOver="Switch('copyright','copyrightOn')" onMouseOut="Switch('copyright','copyrightOff')">
</map>
<map name="aboutMap">
  <area shape="rect" coords="24,40,111,72" href="about.htm" alt="About" onMouseOver="Switch('about','aboutOn')" onMouseOut="Switch('about','aboutOff')">
</map>
<map name="contactMap">
  <area shape="rect" coords="21,43,111,75" href="contact.htm" alt="Contact" onMouseOver="Switch('contact','contactOn')" onMouseOut="Switch('contact','contactOff')">
</map>
<map name="copyrightMap">
  <area shape="rect" coords="2,52,92,83" href="copyright.htm" alt="Copyright" onMouseOver="Switch('copyright','copyrightOn')" onMouseOut="Switch('copyright','copyrightOff')">
</map>
<map name="herfdnMap">
  <area onMouseOver="Switch('herfdn','herfdnOn')" onMouseOut="Switch('herfdn','herfdnOff')" shape="rect" coords="0,6,130,83" href="hehehe.htm" target="_blank">
</map>
<map name="sourceMap">
  <area shape="rect" coords="22,4,95,83" href="ehehe.htm" target="_blank" alt="ehehe" onMouseOver="Switch('source','sourceOn')" onMouseOut="Switch('source','sourceOff')">
</map> 
<map name="infoMap">
  <area shape="rect" coords="13,31,155,77" href="infomatic.htm" alt="Infomatics" onMouseOver="Switch('infomatic','infomaticOn')" onMouseOut="Switch('infomatic','infomaticOff')">
</map> 
<map name="multimediaMap">
  <area shape="rect" coords="8,31,150,77" href="multimedia.htm" alt="MultiMedia" onMouseOver="Switch('multimedia','multimediaOn')" onMouseOut="Switch('multimedia','multimediaOff')">
</map>
<map name="activitiesMap">
  <area shape="rect" coords="8,31,150,77" href="activities.htm" alt="Activities" onMouseOver="Switch('activities','activitiesOn')" onMouseOut="Switch('activities','activitiesOff')">
</map>

</body>
</html>



EDIT:
I've tried onMouseOver/onMouseOut and was told to change it to onmouseover/onmouseout. Both don't work. All image links are working here (locally, not online). Please ask any other questions.

Here's whats in the scripts.js file

Code:
//function that swaps pictures
function Switch(imgName,imgObjName)
{
  if (document.images)
  {
   document.images[imgName].src = eval(imgObjName + ".src");
  }
}
 
Dunno, are you sure the path to the .js file is correct? I copied/pasted it here and put the Switch function in the same file as the html and it works fine in Firefox and IE6
 
Don't use javascript for rollovers. That whole chunk of code could be done with about half that much CSS.
 
I don't really care, I picked something and went with it.

I fixed the problem... moved the Switch function into the head of the html document
 
Back
Top