Link to home
Create AccountLog in
Avatar of jen4950
jen4950

asked on

onClick does not validate under XHTML Strict

I am one error away from having my new template validate under XHTML 4.01 Strict. I am getting: Line 122, Column 136: there is no attribute "onClick".

Where I use it is in the code snippet.

How can I get this functionality to validate under XHTML Strict?
<a onclick="window.print()" href="#">Print</a>

Open in new window

Avatar of hernst42
hernst42
Flag of Germany image

do you have onClick or onclick ? and there is no XHTML 4.01 Strict, only HTML 4.01 Strict and there onclick/all attributes are written in lowecase.
It may not be possible to get it to validate Strict, but this page may lead you to a workaround:
http://www.eionet.europa.eu/software/design/openingnew

HTH< ~Ray
Avatar of jen4950
jen4950

ASKER

I'm sorry- typo- XHTML 1.0 Strict; I actually used the javascript fix to getaround the _blank target problem; degrades gracefully..

But the onclick problem is a little more elusive.
also in XHTML the onclick attribute must be written in lowercase.
Avatar of jen4950

ASKER

I've got it in lowercase- here's the file: http://vacorp.com/common/index.asp
ASKER CERTIFIED SOLUTION
Avatar of alexpercsi
alexpercsi
Flag of Romania image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of jen4950

ASKER

Thank you! Well Done!