PDA

View Full Version : Image Thumbnail viewer: close by clicking on image as well as text



kindredm7
12-29-2005, 08:32 PM
Hi there,

I am using 'Image Thumbnail viewer' on my eBay listings, and although it works beautifully, I would like users to be allowed to close the popup window by clicking on the image as well as on the 'Close' link.

Could someone please help with any tweaking or new code I would need to add to the script to allow me to do this?

For reference, one of the item pages with the script can be found here:
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=4429774264

Many thanks,

Sam

jstgermain
12-29-2005, 10:50 PM
not a problem bro, i can help with that. currently there is a line in the code that says:



crossobj.innerHTML='<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">Click here to close this pop-up window</span> </div><img src="'+which+'">'


change it to the following:



crossobj.innerHTML='<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">Click here to close this pop-up window</span> </div><a style="cursor: pointer;" onClick="closepreview()"><img src="'+which+'"></a>'


simple as that. instead of it just displaying the specific image, it now is telling it to dispaly the specific image as a link, just like the "Click here to close this pop-up window" link. in doing this, the image is now a link and you can click it to close the window. enjoy. :)

kindredm7
12-29-2005, 10:58 PM
Excellent - just what I wanted! Thanks man.

:)

-K.