How do you close a frameset from a child window in NN4. This is driving me nuts.

G

Guest

In IE, from the child window of a frameset i use the function

top.window.close()

And this works in IE, but not in nn4!

How can i make this same effect in nn4?

please help
 
L

Lee

In IE, from the child window of a frameset i use the function

top.window.close()

And this works in IE, but not in nn4!

How can i make this same effect in nn4?

The "top" attribute of the current window is the window at the top.
Windows don't have an attribute named "window".

top.close()
 
G

Guest

Lee said:
The "top" attribute of the current window is the window at the top.
Windows don't have an attribute named "window".

top.close()

top.close() did not work
do you have any other ideas?

I called top.close() from a page within a framset in NN4 and it did Not
close the frameset.
I'm despereate for an answer. Any help is appreciated
 
M

Martin Honnen

In IE, from the child window of a frameset i use the function

top.window.close()

And this works in IE, but not in nn4!

How can i make this same effect in nn4?

With script in Netscape 4 you can only close windows that script opened
with window.open. If the user opened the window in other ways a
confirmation dialog should come up asking him whether he agrees to
closing the window.
Besides that
top.window.close()
should work, if it doesn't I rather suspect you are not having it in the
right place, provide some context and make sure you check the Netscape
JavaScript console for any errors. Provide a URL maybe where the problem
occurs.
 
D

DU

In IE, from the child window

child window or child/inner frame? This is important to first untangle.

of a frameset i use the function
top.window.close()

parent.close()
if you meant the child/inner frame.
This also depends on the frameset containment hierarchy. Here, we don't
see what is your webpage, what is its frameset containment hierarchy (or
if you're actually referring to a real secondary window). In some cases,
parent.close() would be correct while in other cases, top.close() would
be the only correct solution.
Note that some browsers will neutralize recourse to close() if user-pref
setting disallow recourse to such method, even if the window was created
by javascript.
A general rule is that you can never close a window which was not opened
by javascript.
And this works in IE, but not in nn4!

Do you really want to support a browser which was designed more than 7
year ago? You should worry much more about supporting NS 7.1 and you
should consider dropping webpage based on frame design: it's widely
known that frames bring many usability and accessibility burdens to users.
How can i make this same effect in nn4?

please help

What had this post to do with java?

DU
 
G

Guest

In IE, from the child window
child window or child/inner frame? This is important to first untangle.

I mean a page that was loaded into a Frameset.
I don't know if that would be a child or inner frame.
of a frameset i use the function

parent.close()
if you meant the child/inner frame.
This also depends on the frameset containment hierarchy. Here, we don't
see what is your webpage, what is its frameset containment hierarchy (or
if you're actually referring to a real secondary window). In some cases,
parent.close() would be correct while in other cases, top.close() would
be the only correct solution.
Note that some browsers will neutralize recourse to close() if user-pref
setting disallow recourse to such method, even if the window was created
by javascript.
A general rule is that you can never close a window which was not opened
by javascript.

Thanks for the info.
Do you really want to support a browser which was designed more than 7
year ago? You should worry much more about supporting NS 7.1 and you
should consider dropping webpage based on frame design: it's widely
known that frames bring many usability and accessibility burdens to users.

Yes i know. I have a really picky client who saw that one of our local
Kinkos had NN4 on nearly every computer
and after that. I was requested to make the webpages NN4 compatible.
What had this post to do with java?

It didn't, the forum comp.lang.java.javascript seemed confusing, but i
figured the discussion in that room was
javascript and not java

Thanks bud.

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top