Image popup

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Image popup

Post 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.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post 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...
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

Got it working. Many thanks CoderGoblin
Post Reply