You are here: irt.org | FAQ | JavaScript | Source | Q399 [ previous next ]
In Netscape you can use JavaScript entities:
<script language="JavaScript"><!-- var file = "filename.js"; //--></script> <script src="&{file};" language="Javascript1.1"></script>
However, Internet Explorer does not support JavaScript entities, which is what &{file}; is.
Try instead:
<script language="JavaScript"><!-- var file = "filename.js"; //--></script> <script language="JavaScript"><!-- document.write('<script src="' + file + '"><\/script>'); //--></script>