suess0r Posted March 27, 2007 Share Posted March 27, 2007 Hi there, I basically want to use a GET to find out which Template my customer has chosen and basically make a rollover from the Template Images they chose. The $id is the same name as the image, and $id-over.gif is the rollover image... Here's what i got <?php $id = $_GET["id"]; echo '<a href="http://www.google.com" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage("Image126","","images/FlashdesignTemplates/Big/'.$id.'-over.gif",1)"><img src="images/FlashdesignTemplates/Big/'.$id.'.gif" name="Image126" width="329" height="326" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage("Flash","","images/FlashdesignTemplates/Big/'.$id.'-over.gif",1)"></a></td>'; ?> I'm getting a display of the Original image but it's not doing the Rollover (i would assume because i'm no longer in the PHP when the user runs the mouseover) but could use a lil help, thanks! Link to comment https://forums.phpfreaks.com/topic/44443-doing-a-rollover-image-in-php/ Share on other sites More sharing options...
JasonLewis Posted March 27, 2007 Share Posted March 27, 2007 here is the code fixed up. <?php $id = $_GET['id']; echo "<img src=\"images/FlashdesignTemplates/Big/{$id}.gif\" name=\"Image126\" width=\"329\" height=\"326\" border=\"0\"><a href=\"#\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Flash','','images/FlashdesignTemplates/Big/{$id}-over.gif',1)\"></a></td>"; ?> but tell me, should the image be between the <a> tag? Link to comment https://forums.phpfreaks.com/topic/44443-doing-a-rollover-image-in-php/#findComment-215878 Share on other sites More sharing options...
suess0r Posted March 27, 2007 Author Share Posted March 27, 2007 Hi, The rollovers still not working, the image shows up fine but again the mouseover isn't doing anything. It does have to be in between the <a> tag b/c each different template needs to link to a site preview aka /Template/Preview/$id.html. I'd really like to get this to work but I dunno why the rollover still doesn't work? Anyone have any ideas? Link to comment https://forums.phpfreaks.com/topic/44443-doing-a-rollover-image-in-php/#findComment-216071 Share on other sites More sharing options...
suess0r Posted March 27, 2007 Author Share Posted March 27, 2007 Anyone have any thoughts or opinions that might help? Link to comment https://forums.phpfreaks.com/topic/44443-doing-a-rollover-image-in-php/#findComment-216196 Share on other sites More sharing options...
JasonLewis Posted March 30, 2007 Share Posted March 30, 2007 it may be something wrong with your javascript then. post your javascript in that forum and see if there are any errors in that. Link to comment https://forums.phpfreaks.com/topic/44443-doing-a-rollover-image-in-php/#findComment-218089 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.