/    Sign up×
Community /Pin to ProfileBookmark

breaking out of frames in Mozilla browser

Can anyone with some familiarity with the Mozilla DOM tell me why the following code to break out of frames wont work? It does work in Internet Explorer, the older Netscapes, but not the newer Mozilla 1.x (I’ve got 1.6 now)… Basically, I don’t want people to “feature” my website with some advertisement in a top frame, and until MOZILLA, (and the last 7.1 incarnaation of Netscape), this script worked on everything. Originally I though the problem was the “popup” manager blocking the window functions. But that doesn’t seem to make a difference.

function frameBreak()
{
if (window.parent != window.self )
{window.open(‘http://myrealwebsite.com‘, ‘_top’); }
}

<body onload=”Javascript:frameBreak();”>

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @PeterPan_321 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.15,
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,
)...