to get the full idea of the desired effect, quickly vist this link
http://www.sonsofmaxwell.com/en/viewGallery.php?eid=6.
notice that when each thumbnail is clicked, the main image is replaced
by the thumbnail.
here is the JS code that triggers that effect:
function errorsuppressor(){
return true
}
window.onerror=errorsuppressor
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue =
whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue =
whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
Now, i transferred this over to cake, and placed in my necessary
attributes.
<img src="someimage.jpeg" id="placeholder" />
<li><?php echo $html->link($html->image('inv/'. $photo['img'],
array('width' => '180px')), '/img/inv/'. $photo['img'],
array('onClick' => 'return showPic(this)', 'title' => 'Gary Dunham'),
false, false); ?></li>
which gives me the onclick attribute i need to trigger the image. the
image swaps, but also points to a link similar as
http://localhost/garydunhamequipment/img/inv/gary_dunham_ver2.gif in
the browser. i just want it to swap like it did in the above
example. i am wondering, is there something possibly different about
the headers generated by a cake app that is causing this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---