/    Sign up×
Community /Pin to ProfileBookmark

onMousover event issue

?

My code fails (rightly?) W3C validation on a bunch of (similar) pages due to the onMouseover event I am using.

[CODE]<a href=”Sauna_Bens01.html” onMouseover=”showtip(this,event,’0′)” onMouseOut=”hidetip()” target=”_top”>1</a>[/CODE]

This is used so that a hover over a number (“1” in this case) gives a tooltip as to what Page 1 actually contains.

What is wrong? It works really well and so I’d like to use it, but I also would like fully valid and validated pages.

Any clues??

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@KravvitzOct 31.2007 — So you're using XHTML 1.0 Transitional? Why?

In XHTML all element and attribute names should be all lowercase. (It's good practice, although not required, to do the same in HTML as well.)

It's best to avoid using inline event handlers whenever possible. I suggest you read up on [url=http://www.dynamicsitesolutions.com/javascript/best-practices/#unobtrusive_javascript]Unobtrusive JavaScript and other JavaScript Best Practices[/url].
Copy linkTweet thisAlerts:
@BuokaauthorOct 31.2007 — What's the issue with xhtml 1?, please
Copy linkTweet thisAlerts:
@TJ111Oct 31.2007 — Unless you specifically need xhtml, and are properly serving the page as xhmtl (which IE doesn't support), then theres no need to use xhtml. I had read all the xhtml stuff and thought it was the way to go, but as a bunch of people on this forum will point out, if you don't know why you need xhtml over html, you probably shouldnt be using it. [url=http://www.hixie.ch/advocacy/xhtml]Look this over[/url].
Copy linkTweet thisAlerts:
@KravvitzOct 31.2007 — You're welcome ?

1) Check out the [url=http://www.sitepoint.com/forums/showthread.php?t=393445]XHTML vs HTML FAQ[/url].

2) [url=http://www.456bereastreet.com/archive/200609/no_more_transitional_doctypes_please/]No more Transitional DOCTYPEs, please[/url]

[url=http://accessites.org/gbcms_xml/news_page.php?id=23]It's Time To Kill Off Transitional DOCTYPES[/url]

[url=http://24ways.org/advent/transitional-vs-strict-markup]Transitional vs. Strict Markup[/url]
×

Success!

Help @Buoka spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...