|2 JS functions, 1 not working in NN|
A JS function not working in NN when combined with function window.close
| 4:57 am on Mar 19, 2003 (gmt 0)|
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]
| 8:12 am on Mar 19, 2003 (gmt 0)|
| 1:02 pm on Mar 19, 2003 (gmt 0)|
| 7:04 pm on Mar 19, 2003 (gmt 0)|
Change this line:
or this may work?
and this line:
| 9:39 pm on Mar 19, 2003 (gmt 0)|
Nicely spotted, Gizmare!
Yep, I'd have to second that suggestion. It should solve your problem :)
| 1:16 am on Mar 20, 2003 (gmt 0)|
Thanks Gizmare and DrDoc.
The window.close function, as before, works fine.
| 6:09 am on Mar 20, 2003 (gmt 0)|
Does the new window have a different name than the first one? If not, it will open in the same window...
| 10:59 pm on Mar 20, 2003 (gmt 0)|
Here is the code I use to accomplish this task. It works with NN4.7 , NN6+ and IE4+.
| 12:10 am on Mar 21, 2003 (gmt 0)|
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.
| 12:29 am on Mar 21, 2003 (gmt 0)|
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... ;-)!