Change background of parent cell

I am trying to change the background of the parent cell of a hyperlink.  What I currently have is <a href="test.html" onmouseover="this.parentNode.style.background-image='url(images/DkBlueSlantedTAB.gif)';"  But the problem is that this returns a syntax error.  Any ideas?
johnywhiteAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ZvonkoConnect With a Mentor Systems architectCommented:
Yes, this one:

onmouseover="this.parentNode.style.backgroundImage='url(images/DkBlueSlantedTAB.gif)';"  

0
 
johnywhiteAuthor Commented:
That works thanks.  It's amazing what a simple hyphen can do.
0
 
ZvonkoSystems architectCommented:
You can see it as a rule: every hyphen in CSS changes in Script the following character to uppercase and disappears.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
ZvonkoSystems architectCommented:
Do you have problems closing answered questions?
Click on this: http:viewQuestionHistory.jsp?mid=3478229&orderBy=9&sort=1

0
 
johnywhiteAuthor Commented:
Sorry about that.  I only don't close a question when I am waiting for a resolution to the problem.
0
 
ZvonkoSystems architectCommented:
No problem. See you in the onMouseUp problem.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.