Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Open page in parent window; close popup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Open page in parent window; close popup

 Post Reply Post Reply
Author
pedalcars View Drop Down
Senior Member
Senior Member


Joined: 12 August 2002
Location: United Kingdom
Status: Offline
Points: 268
Post Options Post Options   Thanks (0) Thanks(0)   Quote pedalcars Quote  Post ReplyReply Direct Link To This Post Topic: Open page in parent window; close popup
    Posted: 06 August 2003 at 7:34am
I have a main page, default.asp, which includes links which will spawn a pop-up window. In the pop-up there are various options to do various things, like log in, register, etc.

If there is an error (eg on registration the two passwords are different, or blank, or contain forbidden characters) the viewer will be bounced back and asked to correct things. That bit's easy, tick, done.

What I need to do is, when the login (etc) is successful, for the viewer to be taken back to default.asp, but to have this reloaded in the main window while the popup gets closed.

I'm thinking, If (action) OK Then redirect to another page (ok.asp) in the pop-up, which will reload default.asp in the main window then close itself in the pop-up.

I've found (on this forum ) some javascript for doing this when the viewer clicks on a link, but is it possible to do automatically (no clicking requied) and preferably without using JS?

Thanks.

PS. If JS is essential, don't worry, I can always put in an explanation of what a view would have to do if they had JS disabled. But the automatic nature rather than the "click here" solution is more important!

Edited by pedalcars
www.pedalcars.info

The most fun on four wheels

Back to Top
PaulGQ View Drop Down
Newbie
Newbie
Avatar

Joined: 11 June 2003
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote PaulGQ Quote  Post ReplyReply Direct Link To This Post Posted: 07 August 2003 at 12:39pm

I've used this before.

first use meta refresh to get the popup to a page with <onload=self.close()> in the body.

<META HTTP-EQUIV=REFRESH CONTENT="1;URL=AutoClose.asp">

then on the unload event us the following 

<body onUnload="window.opener.location.reload()">

The page closes and updates the parent window.

Just work the parent so it can handle regular then updated material.

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.