bbruggemeyer
Programmer
Hi all
I am using an external .js file to dynamically link several more .js files into an HTML page. This is a great technique for being able to switch code elements without having to edit hundreds of static HTML pages (Can't use server-side!)
The problem occurs with Netscape browsers. It seems to work fine in the majority of cases but on some pages the Netscape parser seems to give up half way through the main HTML page, even though the View Source window shows that all code has been downloaded.
Has anyone tried a similar technique and found it successful or am I trying to do too much with the browser?
Technique is as follows...
HTML page includes
all_code.js includes
example of error
Line from view source
I am using an external .js file to dynamically link several more .js files into an HTML page. This is a great technique for being able to switch code elements without having to edit hundreds of static HTML pages (Can't use server-side!)
The problem occurs with Netscape browsers. It seems to work fine in the majority of cases but on some pages the Netscape parser seems to give up half way through the main HTML page, even though the View Source window shows that all code has been downloaded.
Has anyone tried a similar technique and found it successful or am I trying to do too much with the browser?
Technique is as follows...
HTML page includes
Code:
<SCRIPT language="javascript" src="all_code.js"></SCRIPT>
<script language="javascript">
<!--
// Page specific javascript, including...
document.title = myTitle.toUpperCase() + " - Summary";
//-->
</script>
all_code.js includes
Code:
document.writeln('<SCRIPT Language="javascript" src="module1.js"></SCRIPT>');
document.writeln('<SCRIPT Language="javascript" src="module2.js"></SCRIPT>');
document.writeln('<SCRIPT Language="javascript" src="module3.js"></SCRIPT>');
example of error
Code:
unterminated string literal.
document.title = myTitle.toUpperCase() + " - Summ
.............................................^
Line from view source
Code:
document.title = myTitle.toUpperCase() + " - Summary";