Article View: aus.computers.java
Article #554window.open makes *2* windows??!
From: joel callahan
Date: Thu, 24 Aug 2000 00:00
Date: Thu, 24 Aug 2000 00:00
75 lines
2610 bytes
2610 bytes
Hello...
SCENARIO:
=========
I have a webpage that is intentionally called from another website and puts
my page in a frame. I've been able to remove the frame using javascript.
My page fits exactly in 800x600. When I was making the page, I had F11
(full screen) on, so I could get the entire screen.
NOW...
not everyone uses F11. Sooo... I've been trying to simulate pressing F11.
Solution:
I made two web pages. The first one (main.html) is called by the other
website's frame. this first website breaks out of the frames and then opens
a second web page fullscreen. A timer closes this first window.
The second window (main-new.html) does all the work and has a close button
which does a window.close.
PROBLEM:
Well, I don't like using a launcher webpage, but it's no biggie. The
problem is this - For some reason, it launches TWO COPIES of the second web
page. Both are maximized and by clicking on the close button (twice - once
for each page), they both go away, but what am I doing wrong to make two
copies of
the second open???
Thanks in advance!!
-Lucy
lhampshire@bigpond.com
***********************
MAIN.HTML
==========
<HTML>
<HEAD>
<TITLE>Test</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--break out of frames-->
if (parent.frames.length>0){
parent.location.href=location.href;
}
<!--close the calling webpage in 5 seconds-->
setTimeout('self.close()',5000);
<!--now open the real window fully maximized-->
window.open("main-new.html","newwindow","menubar=yes");
</SCRIPT>
</HEAD>
</HTML>
*************************
MAIN-NEW.HTML
===============
<HTML>
<HEAD>
<TITLE>main-new.html</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--break out of frames-->
if (parent.frames.length>0){
parent.location.href=location.href;
}
</SCRIPT>
</HEAD>
<BODY>
<CENTER>
main-new.html<P><P>
<A HREF="javascript:window.close()">Close Me!</A>
</CENTER>
</BODY>
</HTML>
Technical Details
Message-ID:
<8v8p5.37156$c5.103101@newsfeeds.bigpond.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,1194f35746d760d5,start X-Google-Attributes: gid10d6db,public From: "joel callahan" <joel@dhimaging.com.au> Subject: window.open makes *2* windows??! Date: 2000/08/24 Message-ID: <8v8p5.37156$c5.103101@newsfeeds.bigpond.com> X-Deja-AN: 661930687 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Trace: newsfeeds.bigpond.com 967119940 139.134.216.16 (Thu, 24 Aug 2000 22:25:40 EST) Organization: Telstra BigPond Internet Services (http://www.bigpond.com) X-MSMail-Priority: Normal NNTP-Posting-Date: Thu, 24 Aug 2000 22:25:40 EST Newsgroups: aus.computers.java