Jump to content

Showing a thumbnail on hovering over a link


stevenjweir

Recommended Posts

Hi,

 

I've recently started working on a site that someone else created. I'm not advanced with PHP like the previous guy was, so picking it up as I go.

 

Currently there is an admin page for managing a database of images uploaded by users. The table on this page grabs the database field values and just fills in the table with tick boxes, etc to manage. Rather than display thumbnails of each of the images on the page directly, the website owner wants to have a list of links to images in the table (this is done), but on hovering over the link, show the thumbnail, have a pop up thumbnail right on the mouse cursor. There already exists the function to grab the thumbnail into the table, but I am unsure how to have this work in a hovering thumb image.

 

Any help would be great.

 

 

Link to comment
Share on other sites

Thanks for the link, that's the link I've used and got as far as getting it to show a thumb on hover, but...

 

Problem is the thumbnail path is selected from within the javascript file. So the file has no way to know what link in the table is being hovered. The code:

 

<?php echo $objDynamicThumb1->Execute(); ?>

 

when added to the javascript:

 

tooltips[0]=["<?php echo $objDynamicThumb1->Execute(); ?>"]

 

I thought that opening a new <?php block would cause issues so I tried:

 

tooltips[0]=["$objDynamicThumb1->Execute()"]

 

and its not working. I just have the feeling that by putting that bit of code out in the .js file it has no way to know what image to show because it doesnt know what row I am hovering.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.