Print Page | Close Window

New window javascript problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15647
Printed Date: 29 March 2026 at 12:51am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: New window javascript problem
Posted By: ub3rl337ch3ch
Subject: New window javascript problem
Date Posted: 29 June 2005 at 12:07am

Part of my ste includes a popup window to handle most of the .asp scripting without having to reload. I use javascript to transfer values between the two windows. Because this new wndow is integral to the functionality of the site, I use a body onload to do window.open evry time the page is loaded. 

The problem is that sometimes as part of the .asp I have to include a js alert. This means that the js becomes part of that second window until it is reloaded. When i reload the first page, it calls the second window, and apparently refreshes the html, which displays the alert again. This is a major problem because it means that once an alert has displayed, it displays every time the first page is reloaded. This is annoying, and makes no sense, as the alert message is specific to a certain occurence.
 
Is there some way that I can close the window before I open it again to ensure that it loads a new instance?



Replies:
Posted By: dj air
Date Posted: 29 June 2005 at 8:42am
you could use

windowname.close
window.open

use a js to close the window, if not closed by using its name, and then re open it, therefore it closes any instance and opens again.

hope that helps im not the best at js


Posted By: ub3rl337ch3ch
Date Posted: 03 July 2005 at 6:51pm
I've tried using windowname.close (with and without ()) but it doesn't seem to work


Posted By: theSCIENTIST
Date Posted: 30 July 2005 at 3:15am
Drop Javascript, if I go to your site, it won't work for me because I always navigate with JS disabled, and so millions of other people.

By the way, your popup is also most likely blocked by the browser internal blocker or by any other blocker the user has installed.

-------------
:: http://www.mylittlehost.com/ - www.mylittlehost.com


Posted By: ub3rl337ch3ch
Date Posted: 31 July 2005 at 7:06pm
Its not a site for public access. Its an online asp program for a campany's internal workings. Thus, the settings conform to the program no the other way around. I would never dream of using popups in an open site... hideous things...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net