/    Sign up×
Community /Pin to ProfileBookmark

window.close(); not working on Mac

I’m designing a site that needs to work at least reasonably well on Mac default browsers. Specifically, IE5.2.

Here is what I’m doing:

[code]var popupWin = “”;

if (popupWin != “”) { popupWin.close(); popupWin = “”; }
popupWin = window.open(url, “popup”, “toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,
width=”+pupW+”,height=”+pupH+”,screenX=”+x+”,screenY=15,top=15,left=”+x);
return false;[/code]

This problem happens in Mac IE 5.2 and Safari v1. The popup will go up on the first link that is clicked, but after that it wont close the window and the link just opens in the current window.

Is there any alternative to .close() that would work on these Mac browsers?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @donut spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...