Mr_J Posted April 24, 2009 Share Posted April 24, 2009 Hi all, I`m no expert. Actually, I only used javascript sniplets for fun stuff like the date, pre-load images etc. Now, I have a PETS Site. I`m using the onmouseover function to display a small image when the user moves his mouse over the link, the image appear. This works except for 2 problems: IE reserves a block of the width and height of the image where FF only show the link. My second problem is: how to make the image disapeer after the user takes his mouse off the link, IF THIS CAN BE DONE... This is my code: <head> <script type="text/javascript"> function mouseOver() { document.getElementById("b1").src="http://mrj.myjalbum.net/boston/slides/q.jpg" } function mouseOut() { document.getElementById("b1").src="#" [color=blue]//I tried to use the img src as well [size=1]DON`t KNOW WHAT TO DO...[/size][/color] } </script> <head> <body> <p>We are proud of our male sire <a href="http://mrj.myjalbum.net/boston/slides/q.jpg" target="_blank" onmouseover="mouseOver()" onmouseout="mouseOut()"> <img border="0" width="200" height="150" alt="Quen Bertasso" title="Quen Bertasso" id="b1"></a>, one of the best breeding blood lines in South Africa, but he will join Angel in retirement.</p> Thank you in advance Jaco Quote Link to comment https://forums.phpfreaks.com/topic/155480-solved-ie-javascript-and-firefox/ Share on other sites More sharing options...
Mr_J Posted April 24, 2009 Author Share Posted April 24, 2009 PS. I got the script from here: http://www.w3schools.com/jsref/jsref_onmouseout.asp Seems like the onmouseout function is working... Only problem now is IE... (ver7) Quote Link to comment https://forums.phpfreaks.com/topic/155480-solved-ie-javascript-and-firefox/#findComment-818142 Share on other sites More sharing options...
RichardRotterdam Posted April 24, 2009 Share Posted April 24, 2009 Sounds like you're describing a tooltip. Try searching around for the keyword "tooltip" here is one example : http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm Quote Link to comment https://forums.phpfreaks.com/topic/155480-solved-ie-javascript-and-firefox/#findComment-818145 Share on other sites More sharing options...
Mr_J Posted April 24, 2009 Author Share Posted April 24, 2009 Not exactly, but the tooltip might work better... Thank you for the tip/link Regards, Jaco Quote Link to comment https://forums.phpfreaks.com/topic/155480-solved-ie-javascript-and-firefox/#findComment-818147 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.