User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,507 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,661 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2251 | Replies: 1 | Solved
Reply
Join Date: Sep 2007
Posts: 2
Reputation: gj6kings is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gj6kings gj6kings is offline Offline
Newbie Poster

Image Map Rollover error

  #1  
Sep 25th, 2007
I am working on an image map rollover...its basically done..but it isn't working in Firefox and I have an error in IE7, however it is still working in I.E.7...was wondering if somebody could take a look and see some glaring error that I am making in my code...It's a fairly basic double-image in a div..using an image map and a few javascripts and function calls...Note - i only finished the rollover effect on the first 3 images from the left - starting with the Bills, Dolphins and Patriots and excluding the A (afc logo).

Here is a link to the menu: http://www.mfllive.com/nfltest.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">

<!--

  
   

-->

</style>
<SCRIPT LANGUAGE="JavaScript">
arClips = new Array();

function setParams(the_clip,from,to) {

arClips[the_clip] = new Array();

arClips[the_clip][0] = from; 

arClips[the_clip][1] = to

}

setParams(1,35,64);
setParams(2,67,89);
setParams(3,94,118);
setParams(4,365,506);
setParams(5,365,506);
setParams(6,365,506);
setParams(7,365,506);
setParams(8,365,506);
setParams(9,365,506);
setParams(10,365,506);
setParams(11,365,506);
setParams(12,365,506);
setParams(13,365,506);
setParams(14,365,506);
setParams(15,365,506);
setParams(16,365,506);
setParams(17,93,234);
setParams(18,236,365);
setParams(19,365,506);
setParams(20,365,506);
setParams(21,365,506);
setParams(22,365,506);
setParams(23,365,506);
setParams(24,365,506);
setParams(25,365,506);
setParams(26,365,506);
setParams(27,365,506);
setParams(28,365,506);
setParams(29,365,506);
setParams(30,365,506);
setParams(31,365,506);
setParams(32,365,506);

clTop = 1;

clBot = 28;

function MM_showHideLayersIM() { //v1.2 Modified by jlowery

var i, visStr, args, theObj;

var clRight, clLeft, the_clip;

args = MM_showHideLayersIM.arguments;

for (i=0; i<(args.length-2); i+=4) { //with 4 args (objNS,objIE,visStr,the_clip)

visStr = args[i+2];

the_clip = args[i+3];

clLeft = arClips[the_clip][0];

clRight = arClips[the_clip][1];

if (navigator.appName == 'Netscape' && document.layers != null) {

document.onLayer.clip.left=clLeft;

document.onLayer.clip.right=clRight;

theObj = eval(args[i]); 

if (theObj) theObj.visibility = visStr; 

} else if (document.all != null) { //IE

if (visStr == 'show') visStr = 'visible'; //convert vals

if (visStr == 'hide') visStr = 'hidden';

document.all.onLayer.style.clip ="rect(" + clTop + " " + clRight + " " + clBot + " " + clLeft + ")";

theObj = eval(args[i+1]); 

if (theObj) theObj.style.visibility = visStr; 

} }

}



</SCRIPT>


<link href="roll.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div id="offLayer" style="position:absolute; width:965px; height:29px; z-index:1; visibility:visible">

<a href="#" onmouseover = "MM_showHideLayersIM('onLayer','','show')" 

onmouseout = "MM_showHideLayersIM('onLayer','','hide')">

<img src="header_logo_off.gif" width="965" height="29" border="0" usemap="#temp">
<map name="temp" id="temp">
<area shape="rect" coords="35,1,64,28" href="http://www.mfllive.com/team/?team=Bills" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',1)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',1)">
<area shape="rect" coords="67,1,89,28" href="http://www.mfllive.com/team/?team=Dolphins" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',2)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',2)">
<area shape="rect" coords="94,1,118,28" href="http://www.mfllive.com/team/?team=Patriots" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',3)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',3)">
<area shape="rect" coords="121,1,147,28" href="http://www.mfllive.com/team/?team=Jets" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',4)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',4)">
<area shape="rect" coords="155,1,182,28" href="http://www.mfllive.com/team/?team=Ravens" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',5)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',5)">
<area shape="rect" coords="183,1,209,28" href="http://www.mfllive.com/team/?team=Bengals" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',6)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',6)">
<area shape="rect" coords="212,1,236,28" href="http://www.mfllive.com/team/?team=Browns" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',7)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',7)">
<area shape="rect" coords="239,1,267,28" href="http://www.mfllive.com/team/?team=Steelers" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',8)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',8)">
<area shape="rect" coords="275,1,302,28" href="http://www.mfllive.com/team/?team=Texans" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',9)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',9)">
<area shape="rect" coords="303,1,331,28" href="http://www.mfllive.com/team/?team=Colts" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',10)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',10)">
<area shape="rect" coords="329,1,356,28" href="http://www.mfllive.com/team/?team=Jaguars" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',11)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',11)">
<area shape="rect" coords="358,1,382,28" href="http://www.mfllive.com/team/?team=Titans" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',12)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',12)">
<area shape="rect" coords="391,1,416,28" href="http://www.mfllive.com/team/?team=Broncos" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',13)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',13)">
<area shape="rect" coords="418,1,446,28" href="http://www.mfllive.com/team/?team=Chiefs" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',14)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',14)">
<area shape="rect" coords="448,1,476,28" href="http://www.mfllive.com/team/?team=Raiders" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',15)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',15)">
<area shape="rect" coords="477,1,505,28" href="http://www.mfllive.com/team/?team=Chargers" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',16)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',16)">
<area shape="rect" coords="539,1,561,28" href="http://www.mfllive.com/team/?team=Cowboys" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',17)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',17)">
<area shape="rect" coords="563,1,589,28" href="http://www.mfllive.com/team/?team=Giants" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',18)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',18)">
<area shape="rect" coords="591,1,614,28" href="http://www.mfllive.com/team/?team=Eagles" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',19)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',19)">
<area shape="rect" coords="615,1,644,28" href="http://www.mfllive.com/team/?team=Redskins" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',20)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',20)">
<area shape="rect" coords="649,1,675,28" href="http://www.mfllive.com/team/?team=Bears" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',21)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',21)">
<area shape="rect" coords="676,1,703,28" href="http://www.mfllive.com/team/?team=Lions" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',22)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',22)">
<area shape="rect" coords="704,1,727,28" href="http://www.mfllive.com/team/?team=Packers" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',23)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',23)">
<area shape="rect" coords="727,1,751,28" href="http://www.mfllive.com/team/?team=Vikings" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',24)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',24)">
<area shape="rect" coords="756,1,781,28" href="http://www.mfllive.com/team/?team=Falcons" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',25)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',25)">
<area shape="rect" coords="782,1,804,28" href="http://www.mfllive.com/team/?team=Panthers" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',26)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',26)">
<area shape="rect" coords="805,1,830,28" href="http://www.mfllive.com/team/?team=Saints" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',27)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',27)">
<area shape="rect" coords="829,1,856,28" href="http://www.mfllive.com/team/?team=Buccaneers" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',28)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',28)">
<area shape="rect" coords="860,1,888,28" href="http://www.mfllive.com/team/?team=Cardinals" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',29)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',29)">
<area shape="rect" coords="890,1,915,28" href="http://www.mfllive.com/team/?team=Rams" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',30)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',30)">
<area shape="rect" coords="915,1,941,28" href="http://www.mfllive.com/team/?team=49ers" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',31)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',31)">
<area shape="rect" coords="943,1,964,28" href="http://www.mfllive.com/team/?team=Seahawks" onmouseout="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','hide',32)" onmouseover="MM_showHideLayersIM('document.layers[\'onLayer\']','document.all[\'onLayer\']','show',32)">
</map></a></div>

<div id="onLayer" style="position:absolute; width:965px; height:29px; z-index:2; overflow:visible; visibility: hidden">

<img src="header_logo_on.gif" width="965" height="29"> 

</div>

</body>


</html>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 2
Reputation: gj6kings is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
gj6kings gj6kings is offline Offline
Newbie Poster

Re: Image Map Rollover error

  #2  
Sep 26th, 2007
ah forget it...it's probably just too old school of a technique..ill re write it differently..
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 3:43 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC