|2 JS functions, 1 not working in NN|
A JS function not working in NN when combined with function window.close
I am using the following function:
<line breaks added to the feature string to prevent side scroll - tedster>
and it is working fine in both IE and NN.
However, when I also use the window.close function it stops working (but the window.close function works fine)in NN! In IE, both functions work.
I have the following in my code:
to visit the xxx web site</a>
Any ideas what could be wrong? I am using NN 4.7.
[edited by: tedster at 6:48 am (utc) on Mar. 19, 2003]
Change this line:
or this may work?
and this line:
Nicely spotted, Gizmare!
Yep, I'd have to second that suggestion. It should solve your problem :)
Thanks Gizmare and DrDoc.
The window.close function, as before, works fine.
Does the new window have a different name than the first one? If not, it will open in the same window...
Here is the code I use to accomplish this task. It works with NN4.7 , NN6+ and IE4+.
The subwinopen() function you're using uses two variables - url and winname. But you're apparently not passing an explicit "winname" variable when you call the function. Just do that, and use a different winname each time you want a separate new window to open.
Also, I notice that the function you've defined already sets the size of the new window as 700x384. You could turn height and width into variables and pass them as parameters whenever you call the function, but you can't expect to override them.
Thanks DrDoc, Gizmare and tedster! Of course I had forgotten to name the window. I guess since it was working perfectly fine in IE, and I had used the same function on another page where there was only one window to open, I just forgot about it. Thanks for reminding my brain to start thinking again... ;-)!