Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rollover not working

Status
Not open for further replies.

bigbird3156

Programmer
Feb 20, 2001
183
AU
Hi, can anyone tell me why this bit of code is not working...

it is supposed to create an image rollover with a link to a new page... passing the value of 'rec_num'...


Code:
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];}
}
Code:
<a href="designer_bio.php?rec_num=<?php echo $row_view_catalogue['rec_num']; ?>"><img src="../pics/bio_up.gif" alt="View Bio" name="Bio_button" width="79" height="34" id="Bio_button" onmouseover="MM_swapImage('Bio_button','','../pics/bio_ov.gif',1)" onmouseout="MM_swapImgRestore()" /></a>
The link works, just not the rollover...

[wiggle]The Bird from Down Under- Bigbird 3156
Programmer?? - I thought the option was pretender not programmer!![jester]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top