...

View Full Version : onMouseOver not working in IE or Safari



jimmyd
12-19-2010, 04:59 PM
Hello! I need a bit of help here, if possible.

This code seems to work well with FireFox. It doesn't work so well with IE or Safari though. The onMouseOver event works properly (changes the bg-color and the bg-image) but the onMouseOut event doesn't work (it changes the bg-color back to normal but not the bg-image).

I don't quite understand the problem.




<table cellspacing="0" cellpadding="0" width="230" height="20">
<tr>
<td class="font1" align="center" style="color:#2a78c6; background-color: #3c3c3c; background-image:url('images/nav-bg.png')" onclick="window.location.href='#'" cursor: pointer;
onMouseOver="this.style.color='c8c8c8'; this.style.backgroundColor='#2a78c6'; this.style.backgroundImage='url(images/nav-bg-hover.png)'"
onMouseOut="this.style.color='#2a78c6'; this.style.backgroundColor='#3c3c3c'; this.style.backgroundImage='url(images/nav-bg.png'">
LINK
</td>
</tr>
</table>


Here is the website... http://pmportfolio.net/tester/.

Also can't figure out how to get that drop-down menu working for IE, if anyone can lend a hand.
Also can't get the gradients to work with IE 8.

DJCMBear
12-19-2010, 05:16 PM
Hello! I need a bit of help here, if possible.

This code seems to work well with FireFox. It doesn't work so well with IE or Safari though. The onMouseOver event works properly (changes the bg-color and the bg-image) but the onMouseOut event doesn't work (it changes the bg-color back to normal but not the bg-image).

I don't quite understand the problem.




<table cellspacing="0" cellpadding="0" width="230" height="20">
<tr>
<td class="font1" align="center" style="color:#2a78c6; background-color: #3c3c3c; background-image:url('images/nav-bg.png')" onclick="window.location.href='#'" cursor: pointer;
onMouseOver="this.style.color='c8c8c8'; this.style.backgroundColor='#2a78c6'; this.style.backgroundImage='url(images/nav-bg-hover.png)'"
onMouseOut="this.style.color='#2a78c6'; this.style.backgroundColor='#3c3c3c'; this.style.backgroundImage='url(images/nav-bg.png'">
LINK
</td>
</tr>
</table>


Here is the website... http://pmportfolio.net/tester/.

Also can't figure out how to get that drop-down menu working for IE, if anyone can lend a hand. I'm new to that sorta thing.

Add the end ) to the url background image your missing the end )



<table cellspacing="0" cellpadding="0" width="230" height="20">
<tr>
<td class="font1" align="center" style="color:#2a78c6; background-color: #3c3c3c; background-image:url('images/nav-bg.png')" onclick="window.location.href='#'" cursor: pointer;
onMouseOver="this.style.color='c8c8c8'; this.style.backgroundColor='#2a78c6'; this.style.backgroundImage='url(images/nav-bg-hover.png)'"
onMouseOut="this.style.color='#2a78c6'; this.style.backgroundColor='#3c3c3c'; this.style.backgroundImage='url(images/nav-bg.png)'">
LINK
</td>
</tr>
</table>

jimmyd
12-19-2010, 05:18 PM
wow, so simple. thanks a lot. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum