Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamically change onmouseOver event

Status
Not open for further replies.

johnpnoble

Programmer
Nov 23, 2006
2
GB
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
 
Some suggestions:

- Try putting "onmouseOver" all in lower-case ("onmouseover").

- Make sure you actually have an element with an ID of "accomodationcell".

- Make sure you have only one element with an ID of "accomodationcell" (IDs should be unique).

- Make sure your "submenuover" class CSS actually does something useful. The function may well be being called, but yuo may never know if the CSS doesn't do anything.

- If all else fails, post your CSS, HTML, and JS, and specify what browsers it isn't working in, and what else you've tried.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
It working now.

- Try putting "onmouseOver" all in lower-case ("onmouseover").

It was changing the case to lowercase that made the difference.

Thanks a lot.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top