|
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 ;
}
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.