Do not use on any
shared computer
August 30, 2008 12:37am pdt
 
[x]
Attachment Details

MouseOver

Zone: JavaScript
Tags: colhockey
I have the following code that uses a mouseOver event to change the tab and banner image below it.  Everything works fine but I would like to be able to change the link on the banner image so that when  each banner has a different link.  The default banner has a link but I can't make it change when the images and banner changes.
<html>
<head>
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
</script>
</head>
</body>

<TABLE WIDTH=430 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=4 ALIGN=left VALIGN=top>
<IMG SRC="images/Headline.gif" WIDTH=430 HEIGHT=33 ALT=""></TD>
</TR><TR>
<TD ALIGN=left VALIGN=top>
<a href="http://www.recreation.du.edu/club/pass.html" target="_blank" onMouseOver="MM_swapImage('pass','','images/Not-Too-Late_02.gif','ftbt','','images/Not-Too-Late_03.gif','cfc','','images/Not-Too-Late_04.gif','colHockey','','images/Not-Too-Late_05.gif','banner','','images/Not-Too-Late_06.gif',1)"><IMG name="pass" SRC="images/Not-Too-Late_02.gif" WIDTH=107 HEIGHT=15 border="0" ALT=""></a></TD>
<TD ALIGN=left VALIGN=top>
<a href="http://www.recreation.du.edu/fitness/fitToBeTied.html" target="_blank" onMouseOver="MM_swapImage('ftbt','','images/Panel-B_03.gif','pass','','images/Panel-B_02.gif','cfc','','images/Not-Too-Late_04.gif','colHockey','','images/Not-Too-Late_05.gif','banner','','images/Panel-B_06.gif',1)"><IMG name="ftbt" SRC="images/Not-Too-Late_03.gif" WIDTH=109 HEIGHT=15 border="0" ALT=""></a></TD>
<TD ALIGN=left VALIGN=top>
<a href="http://www.recreation.du.edu/fitness/membershipSummer.html" target="_blank" onMouseOver="MM_swapImage('banLink','','http://www.du.edu','cfc','','images/Panel-C_04.gif','pass','','images/Panel-B_02.gif','ftbt','','images/Not-Too-Late_03.gif','colHockey','','images/Not-Too-Late_05.gif','banner','','images/Panel-C_06.gif',1)"><IMG name="cfc" SRC="images/Not-Too-Late_04.gif" WIDTH=108 HEIGHT=15 border="0" ALT=""></a></TD>
<TD ALIGN=left VALIGN=top>
<a href="http://www.recreation.du.edu/ice/youthHockeyCamps.html" target="_blank" onMouseOver="MM_swapImage('colHockey','','images/Panel-D_05.gif','cfc','','images/Not-Too-Late_04.gif','pass','','images/Panel-B_02.gif','ftbt','','images/Not-Too-Late_03.gif','banner','','images/Panel-D_06.gif',1)"><IMG name="colHockey" SRC="images/Not-Too-Late_05.gif" WIDTH=106 HEIGHT=15 border="0" ALT=""></a></TD>
</TR><TR>
<TD COLSPAN=4 ALIGN=left VALIGN=top>
<a name="banLink" href="http://www.recreation.du.edu/clubs/pass.html"><IMG name="banner" SRC="images/Not-Too-Late_06.gif" WIDTH=430 HEIGHT=77 border="0" ALT=""></a></TD>
</TR>
</TABLE>
</body>
</html>
Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Programming
Question Asked By: judo2000
Solution Provided By: MaxOvrdrv2
Participating Experts: 1
Solution Grade: A
Views: 0
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by MaxOvrdrv2
Expert Comment by MaxOvrdrv2:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by judo2000
Author Comment by judo2000:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by MaxOvrdrv2
Expert Comment by MaxOvrdrv2:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by judo2000
Author Comment by judo2000:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by MaxOvrdrv2
Expert Comment by MaxOvrdrv2:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by judo2000
Author Comment by judo2000:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Accepted Solution by MaxOvrdrv2
Accepted Solution by MaxOvrdrv2:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Administrative Comment by Venabili
Administrative Comment by Venabili:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by judo2000
Author Comment by judo2000:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34