473,395 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Please Help! - window.close() within frame

Hi, this is probably a very basic question but I'm not a javascript
expert!
Sure you get this asked often! Did some research but can't get it
working.
I'm thankful for any help!

Thanks!

Martin

On my index page I have a frame like this:

</HEAD>
....
<FRAME name="main" SRC="login.aspx" APPLICATION="no">
....
<body>
....
<p>This page uses frames, but your browser doesn't support them.</p>
</body>

On the content page (login.aspx) I've a HTML button with a onclick
event for a javascript like this:

<script language="javascript">
<!--
// Function Close - Close Browser Window
function fnclose() {
parent.opener.close();
}
//-->
</script>

Question is, how do I close the window that actually contains the
frame, I mean close the whole browser from login.aspx? How do I
reference the parent window?
Jul 23 '05 #1
3 2341
Mick,

Thanks for your help! Unfortunately, it top.close() doesn't do the trick.
Any other ideas?
"Mick White" <mw******@BOGUSrochester.rr.com> wrote in message
news:qD*******************@twister.nyroc.rr.com...
Martin wrote:
Hi, this is probably a very basic question but I'm not a javascript
expert!
Sure you get this asked often! Did some research but can't get it
working.
I'm thankful for any help!

Thanks!

Martin

On my index page I have a frame like this:

</HEAD>
...
<FRAME name="main" SRC="login.aspx" APPLICATION="no">
...
<body>
...
<p>This page uses frames, but your browser doesn't support them.</p>
</body>

On the content page (login.aspx) I've a HTML button with a onclick
event for a javascript like this:

<script language="javascript">
<!--
// Function Close - Close Browser Window
function fnclose() {
parent.opener.close();
}
//-->
</script>


top.close();

Iffy proposition though, unless you spawned the window.
Mick

Question is, how do I close the window that actually contains the
frame, I mean close the whole browser from login.aspx? How do I
reference the parent window?

Jul 23 '05 #2
Martin Feuersteiner wrote:
Mick,

Thanks for your help! Unfortunately, it top.close() doesn't do the trick.
Any other ideas?

Something's wrong with your coding then.(URL?)

Note that you cannot reliably close a window that you did not create.
Mick


"Mick White" <mw******@BOGUSrochester.rr.com> wrote in message
news:qD*******************@twister.nyroc.rr.com...
Martin wrote:

Hi, this is probably a very basic question but I'm not a javascript
expert!
Sure you get this asked often! Did some research but can't get it
working.
I'm thankful for any help!

Thanks!

Martin

On my index page I have a frame like this:

</HEAD>
...
<FRAME name="main" SRC="login.aspx" APPLICATION="no">
...
<body>
...
<p>This page uses frames, but your browser doesn't support them.</p>
</body>

On the content page (login.aspx) I've a HTML button with a onclick
event for a javascript like this:

<script language="javascript">
<!--
// Function Close - Close Browser Window
function fnclose() {
parent.opener.close();
}
//-->
</script>


top.close();

Iffy proposition though, unless you spawned the window.
Mick

Question is, how do I close the window that actually contains the
frame, I mean close the whole browser from login.aspx? How do I
reference the parent window?


Jul 23 '05 #3
Martin wrote:
Hi, this is probably a very basic question but I'm not a javascript
expert!
Sure you get this asked often! Did some research but can't get it
working.
I'm thankful for any help!

Thanks!

Martin

On my index page I have a frame like this:

</HEAD>
...
<FRAME name="main" SRC="login.aspx" APPLICATION="no">
...
<body>
...
<p>This page uses frames, but your browser doesn't support them.</p>
</body>

On the content page (login.aspx) I've a HTML button with a onclick
event for a javascript like this:

<script language="javascript">
<!--
// Function Close - Close Browser Window
function fnclose() {
parent.opener.close();
}
//-->
</script>
top.close();

Iffy proposition though, unless you spawned the window.
Mick

Question is, how do I close the window that actually contains the
frame, I mean close the whole browser from login.aspx? How do I
reference the parent window?

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dynamo | last post by:
Hi My site uses frames and some of the frame pages are ranked higher in search engine rankings than the main page. When somebody clicks on the link it takes them to the frame page and they don't...
2
by: Mark | last post by:
Hello I have a page with an inline frame "frameA" on it. Within the frame is a table and within that is a cell with the id "morebit" Previously I would set the innerHTML for this cell from the...
14
by: TrvlOrm | last post by:
OK. After much playing around, I managed to get my frame page this far.. see code below. BUT...there are still errors with it, and what I would like to have happened is this: 1) On the Left...
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
1
by: Dynamo | last post by:
Hi My site uses frames and some of the frame pages are ranked higher in search engine rankings than the main page. When somebody clicks on the link it takes them to the frame page and they don't...
3
by: Audrius | last post by:
Hello, I have to iframes within one page. When I triger action in one frame, I need to update the content's of other frame's selection list. How to access second frame's form element from my...
3
by: Griff | last post by:
I've inherited a web application that uses frames :-( I have an ASP page (within the frame set) that I want to refresh the WHOLE frame set Response.redirect just launches the frame set again...
1
by: MikeZdoesit | last post by:
Hi, I'm having trouble with setting up a shared object and I really need some help from someone more enlighten then myself in the field of actionscript :) Basically I have a talking character that...
7
by: Donn Ingle | last post by:
Hi, I really hope someone can help me -- I'm stuck. I have written three versions of code over a week and still can't get past this problem, it's blocking my path to getting other code written. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.