[thelist] [JavaScript] String Error Help?

Edwin Horneij edwin at lanset.com
Sat Jan 4 00:37:02 CST 2003


My guess is the string "//". Everything following it on that line would
be treated as a comment.

On Friday, January 3, 2003, at 08:24 PM, Steve Clason wrote:

> I'm trying to edit a Dreamweaver extension to include an xhtml
> DTD as an option.  I'm just copy-catting: don't know hardly
> anything about JavaScript. The file now reads:
>
> <html>
> <head>
> <script TYPE="text/js" LANGUAGE="javascript">
> function objectTag() {
> var theDOM = dw.getDocumentDOM()
> theDOM.documentElement.outerHTML = "<!DOCTYPE HTML PUBLIC
> \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n
> \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> \n"
> + theDOM.documentElement.outerHTML;
>         }</script>
> </head>
> <body></body>
> </html>
>
> I get a Javascript error error "unterminated string literal" on
> the line (it will wrap, but it's all one line):
>
> theDOM.documentElement.outerHTML = "<!DOCTYPE HTML PUBLIC
> \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n
> \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> \n"
>
> I can't for the life of me see where that string is unterminated.
> This worked once, but I had to reload DW and lost it.
>
> Can anyone help?
>
> Steve Clason
>
>
>
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>




More information about the thelist mailing list