RE: unterminated string constant error

by Chuck Evans <Chucke(at)captura.com>

 Date:  Tue, 8 Feb 2000 15:37:16 -0800
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original
Thanks to everyone for their responses. I tried subsituting a variable for
"<" as Stephen Thorin suggested, but that didn't work. I also checked the
carriage returns as Peter Newton suggested, but they were fine. Peter Benoit
asked if I really could write an include statement with Javascript. I still
don't know, but I do know you can write other "include" type statements,
such as CSS and javascript file links.

I decided to go to using ASP for the form, since I'm on an IIS server (not
my choice of server). In this way, I can set a variable in the link to the
form (eg, www.mysite.com/myform.asp?formtype=info) and then use Case to
display the correct include statement like this:

<%
Select Case Request("formtype")
Case "info" %>
<!--#include virtual='/includes/include1.html'-->
<% Case "ui_reg" %>
<!--#include virtual='/includes/include2.html'--> 
<% Case Else %>
<!--#include virtual='/includes/include1.html'-->
<% 
End Select
%> 

This is also working in the remainder of the form to customize headings and
explanatory text. So I'm happy, I guess.

---------------------------------------------------------
Chuck Evans
Web Marketing Manager
Captura Software, Inc.
(425) 424-1155
chucke(at)captura.com
www.captura.com

 > -----Original Message-----
> > From: Chuck Evans [SMTP:Chucke(at)captura.com]
> >
> > 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.

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

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.