Page 1 of 1

Image popup

Posted: Tue Dec 12, 2006 10:23 am
by shiznatix
Ok so I have a little thumbnail picture and what I want to happen is when I roll my mouse over it a box or something nifty pops up and displays a larger version of the picture without opening a new window or anything, all on the same page. I saw a page that did this but I cant link you to it because its password protected. The only code I could find when sorting through the source was this:

Code: Select all

<img src="../products/2bottleholder120.jpg" alt="" border="0" width="20" height="20" 
onmouseover="this.T_STATIC=true;this.T_BGCOLOR='ffffff';return escape('<img src=../products/2bottleholder250.jpg border=0>')">
which does nothing for me as T_STATIC and T_BGCOLOR are not defined anywhere. I dont even know what to google for.

EDIT: for an example see http://www.trailflex.com/index.html then add something to your cart then view your cart and hover over the name of the product.

Posted: Tue Dec 12, 2006 10:34 am
by CoderGoblin
Whilst this is overkill you could google for tooltips.
One possibility is JavaScript, DHTML Tooltips

Trouble with most solutions I see is that the full image needs to be loaded or both images (thumbnail/actual). mmm... maybe ajax could be used to return the image tag...

Posted: Tue Dec 12, 2006 11:50 am
by shiznatix
Got it working. Many thanks CoderGoblin