Re: document.write and validation
by Charles A Upsdell <cupsdell(at)upsdell.com>
|
Date: |
Mon, 12 Mar 2001 10:47:26 -0500 |
To: |
hwg-techniques(at)hwg.org |
Cc: |
"tim booker" <timbooker(at)btinternet.com> |
In-Reply-To: |
tim |
|
todo: View
Thread,
Original
|
|
Put a backslash in front of the /a
Thus, document.write('<a href="'index.html">click here<\/a>');
At 06:49 AM 03/12/01, you wrote:
>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
-
Chuck Upsdell
Email: cupsdell(at)istar.ca or cupsdell(at)torfree.net
Website: http://home.istar.ca/~cupsdell/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA