stevenjweir Posted October 6, 2010 Share Posted October 6, 2010 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. Quote Link to comment Share on other sites More sharing options...
litebearer Posted October 6, 2010 Share Posted October 6, 2010 look here http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm Quote Link to comment Share on other sites More sharing options...
stevenjweir Posted October 6, 2010 Author Share Posted October 6, 2010 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. Quote Link to comment Share on other sites More sharing options...
litebearer Posted October 6, 2010 Share Posted October 6, 2010 rather than using it as as separate js file, you could put it in your head section and use php to populate the image list Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.