Pop Up Window Problem

They have: 42 posts

Joined: Dec 2002

Hi All,

When I go from Pop up #2 to a link to a web page (not a pop up) the web page comes comes up the same size as the pop up it is being called from.

Here it is: go to

http://thebestcarepackages.com/test/BuildSiteHere/index.html

Click on the eagle

Click on the Army Emblem

Click on Domestic

That page is the page I want to come up full size not as a pop up.

Any idea why it comes up as a pop up?

Thanks if you can help.

NYColt

dk01's picture

He has: 516 posts

Joined: Mar 2002

Dunno. i think mr norton internet security might have blocked your popup. It shows for a second and then closes. IE6.
-dk

They have: 3 posts

Joined: Feb 2003

yeah the same thing happens to me... only i don't have any kind of popup blocker...

They have: 42 posts

Joined: Dec 2002

Could someone tell me how to close the current window within the script below. This script opens a new pop up but leaves the original pop up open. I want to close the original pop up.

Thanks for any help

NYColt

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

zerocattle.com/examples.popUp.html

read the linked tutorials!

dk01's picture

He has: 516 posts

Joined: Mar 2002

window.close(); before the "return false;" part. The only problem is that in IE and other browsers it will give the user a prompt saying: "The window is trying to close itself. Do you want to continue? Yes or No"

This is a security feature and there is not a way to get around it (i know there are hack for earlier versions of some browsers but in general it wont work well).
-dk

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

As the tutorials illustrate in the link above, if you open a popup, you can control it. So if you open a page FROM that popup, you can then close the original popup without any concern or alert.

They have: 42 posts

Joined: Dec 2002

Hi Suzanne

Thank you fro the help.

I followed the link you posted and downloaded the script but I figure out how it will close one window and open another. If you don't mind could you give me a little insight as to how it works.

Thanks
NYColt

They have: 42 posts

Joined: Dec 2002

I am not quite sure where to put:

window.name = "currentWindow";

and this:

var newWin;

function popUp(page, name, details) {
newWin=window.open(page, name, details);
newWin.focus();
return false;
}

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Did you read the tutorials? That is where the answers all are, including explanations!

The JavaScript functions go in the <script type="javascript"></script> tags, in the tag.

Once you have named a popup window, you can control it. If you popup a window from that original popup window, it will be able to close the original popup window.

Put the popup script in the original popup window, naming it, say:

window.name = "OriginalPopUp";

And then when you open a new window....

click!

You can have the NewerWindow close the Original Window, by using something like:

Now keep in mind I'm typing this out of my head without checking anything, so READ THOSE TUTORIALS!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.