Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Bugs | Q1470 [ previous next ]

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

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 ;
}

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.