[Javascript] Wacky unterminated string + alert + IFRAME error....

TomMallard mallard at serv.net
Mon May 7 08:59:43 CDT 2001


What line does the error message have without the alert in it?

tom
----- Original Message ----- 
From: "Craig Michael Nathan" <cnathan at MEconomy.com>
To: <javascript at LaTech.edu>
Sent: Monday, May 07, 2001 12:50 AM
Subject: [Javascript] Wacky unterminated string + alert + IFRAME error....


> Wacky unterminated string + alert + IFRAME error....
> 
> 
> I have a page that embeds a remote javascript file.
> That remote javascript file (MEchecker_test.js) creates 
> an IFRAME, and then attempts to write into it.
> 
> When the remote javascript file includes an alert() function,
> it works perfectly.  When I remove the alert() function,
> I get an "unterminated string constant".
> 
> I've tested in both IE 5.01 and 5.5, with the same results.
> 
> Any ideas?
> 
> Please respond to: cnathan at MEconomy.com
> 
> Thanks!
> 
> -Craig
> 
> 
> *************** HTML *********************
>  
> <html><head><title>Test</title><body>
> 
> <script language="JavaScript1.2" src="MEchecker_test.js"></script>
> 
> <h3>test</h3></body></html>
> 
> 
> ********* Remote JavaScript (MEchecker_test.js) ***********
> 
> document.write('<IFRAME ID="myIFRAME" WIDTH="0" HEIGHT="0"></IFRAME>');
> 
> var qt = "'";
> 
> function fillIFRAME() {
> 
> // *** UNCOMMENT THIS NEXT LINE TO MAKE THIS SCRIPT WORK:
>  // alert ('isIE!');
> ilSrc = 'javascript:document.write('+qt+'<script
> language="JavaScript">alert("works!");</script>'+qt+');';
> document.all.myIFRAME.src = ilSrc;
> }
> 
> window.onLoad=fillIFRAME();
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
> 





More information about the Javascript mailing list