Re: XHTML and Java
by Charles A Upsdell <cupsdell(at)upsdell.com>
|
Date: |
Wed, 21 May 2003 14:26:52 -0400 |
To: |
hwg-techniques(at)hwg.org |
Cc: |
"rudy" <rudy937(at)rogers.com> |
References: |
fl |
|
todo: View
Thread,
Original
|
|
At 01:23 PM 05/21/03, you wrote:
> >> assume that visitors who want your java applet
> >> will have javascript turned on
> >>
> >>document.write your applet tag
> >>
> >> presto!! xhtml strict
> >
> > Isn't that just a way of sneaking in non-compliant code, though? If so, I
> > might as well keep using my current method. It's not compliant, but it
> > works...
>
>nope, i tested it on something i was doing on my own site, and it works, the
>document validates strict
Inserting invalid elements on the fly using JavaScript may enable you to
get the page to validate, but it does not make the page valid: you are
just taking advantage of a weakness in the validator, i.e. that it
validates the contents of the source file, not the HTML or xHTML that the
browser actually renders.
One could generate an entire invalid page using JavaScript -- a page which
contains nothing but a valid JavaScript invocation -- but this would not
make the result valid in any meaningful sense.
One could, I suppose, put the code for the W3C Validation button in the
<noscript> tag: in this case the label claiming that the page is valid
would only appear if JavaScript were disabled or not supported ... ;-)
-
Chuck Upsdell
Email: cupsdell(at)upsdell.com
Website: http://www.upsdell.com/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA