document.write and validation

by "tim booker" <timbooker(at)btinternet.com>

 Date:  Mon, 12 Mar 2001 11:49:55 -0000
 To:  "Hwg-Techniques" <hwg-techniques(at)hwg.org>,
<wdf(at)yahoogroups.com>
  todo: View Thread, Original
Hello All,

When I try to validate a page that uses document.write to insert HTML, the
W3C validator gives me an error.

For example, if I had:

document.write('<a href="'index.html">click here</a>');

The validator doesn't seem to see the opening tag, and so reports an error
when it sees the closing.

Is that section of JavaScript invalid?  Or, is it a problem with the
validator that causes it not to see the opening tag?

How can I get around this validation problem?

Tim


www.timbooker.com

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA