the following code is a snippet of a php script for a link that when clicked, loads a javascript routine that loads the picture in
Code:
echo "<td><a href=\"files/".$picture_name."-".$pic_number.".jpg\" rel=\"transition[appear]\" ><img height=\"100\" src=\"files/".$picture_name."-".$pic_number."t.jpg\"/></a></td>";
whenever i put the standard 'follow link' it always loads the image in a separate window
what i need to do is make sure the rel= part is obeyed on mouseover as well, it works when clicked and the mouseover part is omitted
this is the entire php script (minus the js files)
Code:
<?PHP
if (arg(0) == 'node' or arg(0) == 'print'){$node = node_load(intval(arg(1)));
$num_pictures=$node->field_photos[0]['value'];
$picture_name=$node->field_vin[0]['value'];
}
if ($picture_name=="array"){} else {
$picnum = preg_replace('/[^0-9\s]/', '', $num_pictures);
$patha= substr($picture_name,13,2);
$pathb= substr($picture_name,15,2);
$pic_number=1;
echo "<head><script>
/*
Script by JavaScript Kit
(http://javascriptkit.com)
Over 400+ free original scripts here
*/
function loadfollow(which){
if (!window.win2||win2.closed)
win2=window.open(which.href)
else
win2.location=which.href
}
</script><script type=\"text/javascript\" src=\"files/includes/scrollDiv.js\"></script><script type=\"text/javascript\" src=\"files/transition_js/prototype.js\"></script><script type=\"text/javascript\" src=\"files/transition_js/scriptaculous.js?load=effects\"></script><script type=\"text/javascript\" src=\"files/transition_js/transition.js\"></script>
</head><table width=100%><tr><td width=20%></td><td align=right><div id = \"rightCol\">
<div id=\"holder\" style=\"border: 5px solid #999; width: 640px; height: 480px;float:left\">
<img src=\"files/".$picture_name."-".$pic_number.".jpg\" />
</div>
</td></tr><tr>";
echo "<td></td><td align=right><table width=630px><tr><td><a href=\"#null\" onmouseover=\"scrollDivRight('scroll')\" onmouseout=\"stopMe()\"><img src=\"http://pictures.gotdns.org/arrow_left.gif\"></img></a></td><td align=center><div id=\"scroll\" style=\"width:570px;overflow:hidden;\"><table><tr>";
for ($pic_number=1;$pic_number<=$picnum;$pic_number++) {
if (!file_exists("files/".$picture_name."-".$pic_number.".jpg")) {
$picture=file_get_contents("http://imgs.getauto.com/imgs/ag/ga/".$patha."/".$pathb."/".$pic_number."/".$picture_name."-".$pic_number.".jpg");
$destination=fopen("files/".$picture_name."-".$pic_number.".jpg",'wb');
fwrite($destination,$picture);
//fclose($picture);
fclose($destination);
}
if (!file_exists("files/".$picture_name."-".$pic_number."t.jpg")) {
$picture=file_get_contents("http://imgs.getauto.com/imgs/ag/ga/".$patha."/".$pathb."/".$pic_number."t/".$picture_name."-".$pic_number."t.jpg");
$destination=fopen("files/".$picture_name."-".$pic_number."t.jpg",'wb');
fwrite($destination,$picture);
fclose($destination);
}
echo "<td><a href=\"files/".$picture_name."-".$pic_number.".jpg\" rel=\"transition[appear]\" ><img height=\"100\" src=\"files/".$picture_name."-".$pic_number."t.jpg\"/></a></td>";
}
echo "</tr></table></div></td><td><a href=\"#null\" onmouseover=\"scrollDivLeft('scroll')\" onmouseout=\"stopMe()\"><img src=\"http://pictures.gotdns.org/arrow_right.gif\"></img></a></td></tr></table></td></tr></table><script type=\"text/javascript\">
oTransition = new Transition( 'holder', 'files/".$picture_name."-1.jpg');
</script> ";
}
?>