Re: unterminated string constant error

by "Peter Newton" <c-newton(at)ihug.co.nz>

 Date:  Wed, 9 Feb 2000 11:22:27 +1300
 To:  <hwg-languages(at)hwg.org>
 References:  network
  todo: View Thread, Original
This could be caused by a hard coded CR/LF between the quotes.
One of the first things I do with my editor when this sort of thing
occures is to turn word wrapping off. This not only make it easy to find
the line number but shows up any accidental line breaks.

I use Note tab light which has this feature and is free.

Hope this helps
Peter Newton


Subject: RE: unterminated string constant error


> I don't know about your script, but can you really document.write an
> include?
>
> > -----Original Message-----
> > From: Chuck Evans [SMTP:Chucke(at)captura.com]
> > Sent: Tuesday, February 08, 2000 2:44 PM
> > To: 'HWG Languages'
> > Subject: unterminated string constant error
> >
> > I have the following javascript (shown below). In every case, when I try
> > to
> > run it, I get an error "Line 26, Char 68, Unterminated string constant".
> > That indicates the character "a" in the word "virtual" in the very first
> > if/then statement. If I've coded the script right (which I obviously
> > haven't) then it should be executing the second if/then, not the first.
I
> > have tried every combination of double and single quotes on the string
to
> > be
> > written but can't get past this error.
> >
> > I must be missing something simple. Please help.
> >
> > <script language="Javascript">
> >
> > var formtype = "ui_reg";
> >
> > if (formtype == "info_request") document.write ("<!--#include
> > virtual='/includes/en/topnav_about_null.html'-->");
> >
> > if (formtype == "ui_reg") document.write ("<!--#include
> > virtual='/includes/en/topnav_prod_serv_null.html'-->") ;
> >
> > if (formtype == "benchmark") document.write ("<!--#include
> > virtual='/includes/en/topnav_prod_serv_null.html'-->") ;
> >
> > </script>
> >
> > ---------------------------------------------------------
> > Chuck Evans
> > Web Marketing Manager
> > Captura Software, Inc.
> > (425) 424-1155
> > chucke(at)captura.com
> > www.captura.com
>

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