Marsha Posted September 14, 2009 Share Posted September 14, 2009 Hey My code follows echo '<td align="center"><a href="' . $scripturl . '?action=downloads;sa=view;down=' . $row['ID_FILE'] . '">',$row['title'],'</a><br />'; Basically ID_FILE is a file ID for a download, and ['title'] is the title name for that download. I want to merge this into the following code <body> <a id="hoverover" style="cursor:default;" onMouseOver="ShowPopup(this);" onMouseOut="HidePopup();"> TITLE HERE </a> <div id="hoverpopup" style="visibility:hidden; position:absolute; top:0; left:0;"> <img src="/images/ ['title'] .png"></font></td></tr> </div></body> So that the code is inside the first code's link... so then, the Title is the text that I scroll over to pop up the Image, which is drawn from /images/ and the title name as the file name, so $row['title'], then I guess thats it... By the way, the Second code is part of a javascript, which is in the following quote just incase you need it. <script type="text/javascript"> function ShowPopup(hoveritem) { hp = document.getElementById("hoverpopup"); // Set position of hover-over popup hp.style.top = hoveritem.offsetTop + 18; hp.style.left = hoveritem.offsetLeft + 20; // Set popup to visible hp.style.visibility = "Visible"; } function HidePopup() { hp = document.getElementById("hoverpopup"); hp.style.visibility = "Hidden"; } </script> I've tried a few times but I just can't crack it, Thanks for any help Marshall Link to comment https://forums.phpfreaks.com/topic/174209-need-help-adding-hover-over-text-image-to-php/ Share on other sites More sharing options...
iPixel Posted September 14, 2009 Share Posted September 14, 2009 I take back what i said... im not sure what exactly your problem is?! Link to comment https://forums.phpfreaks.com/topic/174209-need-help-adding-hover-over-text-image-to-php/#findComment-918364 Share on other sites More sharing options...
Marsha Posted September 14, 2009 Author Share Posted September 14, 2009 lol yeah sorry I didn't explain very well. Ok so $row['title'] is a name of a download that is collected from mysql and ID_FILE is the ID number for that download, also collected from mysql I need the second quote to go into the first quotes link. so <a href="link"> HERE </a> and I also need the $row['title'] to go where I put "TITLE HERE" in the second quote I just keep getting errors when I do it and I don't know exactly where to put stuff lol Thanks Link to comment https://forums.phpfreaks.com/topic/174209-need-help-adding-hover-over-text-image-to-php/#findComment-918372 Share on other sites More sharing options...
Marsha Posted September 14, 2009 Author Share Posted September 14, 2009 Link to comment https://forums.phpfreaks.com/topic/174209-need-help-adding-hover-over-text-image-to-php/#findComment-918467 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.