Loans - Consolidation Loans - Rolex - Myspace Comments - MPAA

PDA

View Full Version : Dynamically Change onmouseOver event


johnpnoble
Nov 24th 2006, 12:13 am
I am trying to change the onmouseOver event dynamically.

Here's what I have:

document.getElementById('accomodationcell').onmouseOver = function(){this.className = 'submenuover'};

Except its not working. Any ideas???

John

vid
Nov 24th 2006, 6:34 am
I think problem is in ID, try to past ID as a number.

ajsa52
Nov 24th 2006, 9:42 am
Try with CSS. Example:

<html>
<head>
<style type="text/css">
a#accomodationcell:hover { text-decoration: none; color: red; background-color: green; }
</style>
</head>
<body>
<a id="accomodationcell" href="www.google.com">Google</a>
</body>
</html>