Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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:

<html>
<head>
<script language="JavaScript" src="MyAlert.js"></script>
</head>
<body>
<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 ;
}
//--></script>
</body>
</html>

Then in MyAlert.js:

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

©2018 Martin Webb