epowder
10-17-2003, 04:35 AM
hi,
i don't know exactly what the problem is here, i think it's the reference i'm writing to an external js file.
I'm opening a new window for writing in it and i would like the window to have functions, so i'm using an external js file.
the writing page :
<html>
<head>
<title>Work</title>
<script language="JavaScript" >
function writePage(){
var newWin = window.open('','');
newWin.document.write("<html><head><scrip"+"t type=\"text\/javascript\" Language=\"JavaScript\" src=\"functions.js\"></scrip"+"t></head>");
newWin.document.write("<body bgcolor=\"#000000\" topmargin=\"0\" leftmargin=\"0\" vlink=\"#00FFFF\">");
newWin.document.write("<p onclick=\"justSome();\"><font color=\"white\">clicking this will call a function in the external js file, just to see that it's working</font><br><br></p>");
newWin.document.write("</body></html>");
newWin.document.close();
}
</script>
</head>
<body onLoad="writePage();">
</body>
</html>
functions.js has just one function for now:
function justSome(){
alert("some alert message");
}
This is working fine locally. It's working fine remotely when using Mozilla, but Internet Explorer hangs on it(at least IEv6).
You can see/test it here http://users.pandora.be/epowder/i.html
Can anyone tell me where the problem is ?
Is it the way i open the window ?
Is it the way i'm writing in it ?
Does anyone else have an alternate way for doing these things ?
Been searching on this for hours :(
thanks a lot
epowder
i don't know exactly what the problem is here, i think it's the reference i'm writing to an external js file.
I'm opening a new window for writing in it and i would like the window to have functions, so i'm using an external js file.
the writing page :
<html>
<head>
<title>Work</title>
<script language="JavaScript" >
function writePage(){
var newWin = window.open('','');
newWin.document.write("<html><head><scrip"+"t type=\"text\/javascript\" Language=\"JavaScript\" src=\"functions.js\"></scrip"+"t></head>");
newWin.document.write("<body bgcolor=\"#000000\" topmargin=\"0\" leftmargin=\"0\" vlink=\"#00FFFF\">");
newWin.document.write("<p onclick=\"justSome();\"><font color=\"white\">clicking this will call a function in the external js file, just to see that it's working</font><br><br></p>");
newWin.document.write("</body></html>");
newWin.document.close();
}
</script>
</head>
<body onLoad="writePage();">
</body>
</html>
functions.js has just one function for now:
function justSome(){
alert("some alert message");
}
This is working fine locally. It's working fine remotely when using Mozilla, but Internet Explorer hangs on it(at least IEv6).
You can see/test it here http://users.pandora.be/epowder/i.html
Can anyone tell me where the problem is ?
Is it the way i open the window ?
Is it the way i'm writing in it ?
Does anyone else have an alternate way for doing these things ?
Been searching on this for hours :(
thanks a lot
epowder