R
Richard Trahan
I have an inscrutable problem with window.open. Consider the following
code:
var graphwin =
window.open("","graphWin","height=400,width=400,resizable=yes");
It works perfectly in one place in my program. The window opens, I write
stuff to it, close the document, and it sits there like it's supposed to.
I put the identical line in a different function, which is supposed to
open the window before the first case is ever encountered, and graphwin
comes back undefined. No messages appear in the NN js console. Venkman
freaked out long ago (fails to load all the js code). I've tried putting
a graphic in the first parameter, but it doesn't help.
There are lots of bug reports about NN window.open in the archives of
this ng, but they all pertain to older versions of NN. What's really
weird is that it works in one place and not the other. The only
meaningful difference between the two functions containing the line is
that the first -- where it works -- is in a button click handler, and
the second is in a function called by an onload handler. Could it be
that NN is not quite stable while it's running onload? I also tried
using different names for the window and return variable, on the chance
that NN could not compile two different window.open statements with the
same name. Same result.
Even more bizarre (or not, depending on your experience) is that the
situation is reversed with IE 6.0; the first case fails with lots of
runtime errors that have something to do with not allowing assignment of
array objects (like var x = myarrayobject), but the second case works fine.
Any comments, please. Thanks.
code:
var graphwin =
window.open("","graphWin","height=400,width=400,resizable=yes");
It works perfectly in one place in my program. The window opens, I write
stuff to it, close the document, and it sits there like it's supposed to.
I put the identical line in a different function, which is supposed to
open the window before the first case is ever encountered, and graphwin
comes back undefined. No messages appear in the NN js console. Venkman
freaked out long ago (fails to load all the js code). I've tried putting
a graphic in the first parameter, but it doesn't help.
There are lots of bug reports about NN window.open in the archives of
this ng, but they all pertain to older versions of NN. What's really
weird is that it works in one place and not the other. The only
meaningful difference between the two functions containing the line is
that the first -- where it works -- is in a button click handler, and
the second is in a function called by an onload handler. Could it be
that NN is not quite stable while it's running onload? I also tried
using different names for the window and return variable, on the chance
that NN could not compile two different window.open statements with the
same name. Same result.
Even more bizarre (or not, depending on your experience) is that the
situation is reversed with IE 6.0; the first case fails with lots of
runtime errors that have something to do with not allowing assignment of
array objects (like var x = myarrayobject), but the second case works fine.
Any comments, please. Thanks.