unterminated string constant error

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

 Date:  Tue, 8 Feb 2000 11:43:50 -0800
 To:  "'HWG Languages'" <hwg-languages(at)hwg.org>
  todo: View Thread, Original
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

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.