Jump to content

Recommended Posts

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

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/155480-solved-ie-javascript-and-firefox/
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.