Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Help needed open/close automatically
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Help needed open/close automatically

 Post Reply Post Reply
Author
Pegaso View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 13 February 2003
Location: Switzerland
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pegaso Quote  Post ReplyReply Direct Link To This Post Topic: Help needed open/close automatically
    Posted: 03 November 2003 at 11:19am

I'm working on a new site, here is the testing site:

http://www.ticinorally.com/aap/newsite/

how you can see when you enter in the index.html, the site open automatically a site with dimension of 800 x 600.

Now, when the 800 x 600 page is loaded that the index.html will be closed automatically.

Can anyone help me or suggest another good solution?

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2003 at 1:39pm
with most browser settings you can only close pages you opened with window.close but you cannot close a user initiated window.
Back to Top
Flamewave View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 June 2002
Location: United States
Status: Offline
Points: 376
Post Options Post Options   Thanks (0) Thanks(0)   Quote Flamewave Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2003 at 2:56pm
well, you can, but it will give the user a warning message saying that the page is trying to close itself.
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.
Back to Top
JoeP View Drop Down
Newbie
Newbie
Avatar

Joined: 10 October 2003
Location: United States
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote JoeP Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2003 at 3:39pm

Is it possible to redirect instead of reloading?  If so this script may be of use to you:

http://www.dhtmlshock.com/other/ResolutionSniffer/default.as p

As stated above, only a popup can be closed with window.close().  Flamewave is also correct, and that warning message can not be turned off.



Edited by JoeP
Back to Top
Pegaso View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 13 February 2003
Location: Switzerland
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pegaso Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2003 at 3:48pm

Index.html is the blank site
Main.html is the site in 800 x 600 pixel (pop-up)

My idea was to insert in the index.html a Open Window command to open Main.html. That was not a problem.

Then, when main.html is loaded main.html will close index.html so that the system didn't show the warning message (that the page is trying to close itself).

I know that if it's possible, i need a javascript, but i didn't know javascript.

Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post Posted: 03 November 2003 at 11:26pm
www.javascriptkit.com. You'll find it most usefull. I know I do .
Cristian Banu
Soft 4 web
Back to Top
Pegaso View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 13 February 2003
Location: Switzerland
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pegaso Quote  Post ReplyReply Direct Link To This Post Posted: 04 November 2003 at 1:25am

Wow thanks Zaboss. And for all the people that have the same problem, here you have the script:

Put in the <head> the following script:

<script language="JavaScript" type="text/JavaScript">
<!--
opener.opener = top; // or whatever, as long as opener.opener has a value;
opener.close()
//-->
</script>

And add to the <body> script this:

<body onLoad="opener.top.close()">

This script will automatically close the page that has loaded you "Pop-up".

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.