Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q1470 Netscape Navigator does not allow you to dynamically write into another window and include an external JavaScript Source file

You are here: irt.org | FAQ | JavaScript | Bugs | Q1470 [ previous next ]

Found a workaround though:

<script language="JavaScript" src="MyAlert.js"></script>
<script language="JavaScript1.1"><!--
function MyPopup() {
  var PopWin ;

  PopWin = window.open('', 'MyPopup', 'width=200,height=80,resizable=yes');
  PopWin.document.open() ;

  PopWin.document.writeln('<body>') ;
  PopWin.document.writeln('<script language="JavaScript">'+MyAlert+'<\/script>');
  PopWin.document.writeln('<script language="JavaScript">MyAlert();<\/script>');
  PopWin.document.writeln('<\/body>') ;

  PopWin.document.close() ;
  return true ;

Then in MyAlert.js:

function MyAlert() {
  window.alert('This is my alert') ;
  return true ;

©2018 Martin Webb