How to get around popup blockers?

G

Guest

So many websites can get around my Googlebar's popup blockers. Even Opera 8
can not stop those popups. I looked into the codes, and I can find nothing
showing me how it is done. Can anyone help me find what how it is done?

First go to
http://www.sitepoint.com/forums/showthread.php?t=184025&page=1&pp=25

Click on
Last ? on the page

Then a pop up with URL
http://www.sitepoint.com/popup/popup.php?zoneid=3&forumid=6
will be shown.

I looked at the page which does have
<script src="/popup/popupjs.php?zoneid=3&amp;forumid=6"
type="text/javascript"></script>
in <head></head>

How did they popup the window?
 
C

Christopher J. Hahn

So many websites can get around my Googlebar's popup blockers. Even Opera 8
can not stop those popups. I looked into the codes, and I can find nothing
showing me how it is done. Can anyone help me find what how it is done?

First go to
http://www.sitepoint.com/forums/showthread.php?t=184025&page=1&pp=25

Click on
Last ? on the page

Then a pop up with URL
http://www.sitepoint.com/popup/popup.php?zoneid=3&forumid=6
will be shown.

I looked at the page which does have
<script src="/popup/popupjs.php?zoneid=3&amp;forumid=6"
type="text/javascript"></script>
in <head></head>

How did they popup the window?

The rules differ, but in general the idea is that if an event is
user-initiated, it will be allowed to open a popup. Thus common popups
that occur when you first visit a page are blocked-- they are
logic-intitiated. But if you click a link or button, it is
user-initiated, and the popup will often be allowed. Sort of like
"implied consent".

Each popup blocker implements its own algorithm, of course, but that's
usually one of the fundamental rules.
 
P

PerlFAQ Server

The rules differ, but in general the idea is that if an event is
user-initiated, it will be allowed to open a popup. Thus common popups
that occur when you first visit a page are blocked-- they are
logic-intitiated. But if you click a link or button, it is
user-initiated, and the popup will often be allowed. Sort of like
"implied consent".

Each popup blocker implements its own algorithm, of course, but that's
usually one of the fundamental rules.

OK, but still which line makes on the page make the thing popup?
 
C

Christopher J. Hahn

PerlFAQ said:
OK, but still which line makes on the page make the thing popup?

whichever one says window.open

I think you've missed the point.
The script isn't defeating the popup blocker.
The user is.
 
P

PerlFAQ Server

whichever one says window.open

I think you've missed the point.
The script isn't defeating the popup blocker.
The user is.

if you read the source of the file, you will understand, there is NO
window.open.
 
C

Christopher J. Hahn

PerlFAQ said:
if you read the source of the file, you will understand, there is NO
window.open.

Line 16 of
http://www.sitepoint.com/popup/popupjs.php?zoneid­=3&amp;forumid=6

reads:
popupnewwindow = window.open('/popup/popup.php', 'popme', 'width=560,
height=420, location=no, menubar=no, status=no, toolbar=no,
scrollbars=auto, resizable=yes, left=200, top=80');

The script tag with an src attribute is a way to include external
script source files in the current document, much as if they were in
the source of the current document.

Is this where your confusion was stemming from?
 
T

Tim Slattery

So many websites can get around my Googlebar's popup blockers. Even Opera 8
can not stop those popups. I looked into the codes, and I can find nothing
showing me how it is done. Can anyone help me find what how it is done?

AFAIK, the pop-up blockers don't block new windows opened by Flash or
Shockwave. That's how these nasty *&#$#( are getting around it.
 
R

runonthespot

There's also the possibly of installed spy/adware. These things can
open windows and do all sorts of annoying stuff, and because they're
(covertly) installed apps, they can often circumvent IE / other browser
controls.

Take a look at adaware from lavasoft.
 
J

Jedi Fans

Tim said:
AFAIK, the pop-up blockers don't block new windows opened by Flash or
Shockwave. That's how these nasty *&#$#( are getting around it.
firefox's one can with a tweak in about:config...
 
J

Jedi Fans

Jedi said:
firefox's one can with a tweak in about:config...
OT but tim please can you add a space to the two -- so it reads without
quotes "-- " instead of "--" as -- does not get recognised as a
signature whereas "-- " does, ty
 
R

RobG

Kristian said:
Quoth Jedi Fans:



Care to share?

It's called 'Flashblock', search for it in Firefox extensions under 'Web
annoyances'. There are lots of other handy doo-dads too...
 
P

PerlFAQ Server

////////////

Not working. I downloaded all the files to my server, and I can not repeat
it. Here is what I have

clickthis.htm:
<a href=index.htm>click here</>

index.htm:
<head>
<script src="popup.js" type="text/javascript"></script>
</head></head></html>

poped.htm:
new

popup.js:
popupnewwindow = window.open('poped.htm', 'popme', 'width=560, height=420,
location=no, menubar=no, status=no, toolbar=no, scrollbars=auto,
resizable=yes, left=200, top=80');
////////////////////////

Now open clickthis.htm and click the link. All googlebar, firefox and Opera
blocked this popup. How they did that I did not do to make they can get
around all popup blockers?
 
C

Christopher J. Hahn

PerlFAQ said:
////////////

Not working. I downloaded all the files to my server, and I can not repeat
it. Here is what I have

clickthis.htm:
<a href=index.htm>click here</>

index.htm:
<head>
<script src="popup.js" type="text/javascript"></script>
</head></head></html>

poped.htm:
new

popup.js:
popupnewwindow = window.open('poped.htm', 'popme', 'width=560, height=420,
location=no, menubar=no, status=no, toolbar=no, scrollbars=auto,
resizable=yes, left=200, top=80');
////////////////////////

Now open clickthis.htm and click the link. All googlebar, firefox and Opera
blocked this popup. How they did that I did not do to make they can get
around all popup blockers?

The popup as you've coded it is not the result of a user-initiated
event. It's logic-initiated upon navigation to the page. You've made it
automatic, instead of requested by implication.


index.html --
<html><head>
<script src="popup.js" type="text/javascript"></script>
</head><body>
<a href="#top" onclick="return(popup())">popup</a>
</body></html>


poped.html --
moomin


popup.js --
function popup() {
popupnewwindow = window.open( 'poped.htm', 'popme',
'width=560, height=420, location=no, menubar=no,
status=no,' +
' toolbar=no, scrollbars=auto, resizable=yes, left=200,
top=80'
);
return false;
}


Here, the popup will occur as a result of the onclick event. Provided
you actually click (or focus and press return) on it, the onclick is
user-initiated and *most* popup blockers will allow the new window to
be opened.
 
P

PerlFAQ Server

index.html --
<html><head>
<script src="popup.js" type="text/javascript"></script>
</head><body>
<a href="#top" onclick="return(popup())">popup</a>
</body></html>


poped.html --
moomin


popup.js --
function popup() {
popupnewwindow = window.open( 'poped.htm', 'popme',
'width=560, height=420, location=no, menubar=no,
status=no,' +
' toolbar=no, scrollbars=auto, resizable=yes, left=200,
top=80'
);
return false;
}


Here, the popup will occur as a result of the onclick event. Provided
you actually click (or focus and press return) on it, the onclick is
user-initiated and *most* popup blockers will allow the new window to
be opened.

I know the trick you wrote here. It is working. However I did not see any of
the onclick on sitepoint.com. I only see
onclick="window.open('member.php?u=38110') onclick="who(284138); return
false; etc. on the html page on
http://www.sitepoint.com/forums/showthread.php?t=184025&page=1&pp=25
Could you find how they did it? I could not repeat it.
 
G

Grant Wagner

PerlFAQ Server said:
I know the trick you wrote here. It is working. However I did not see
any of
the onclick on sitepoint.com. I only see
onclick="window.open('member.php?u=38110') onclick="who(284138);
return
false; etc. on the html page on
http://www.sitepoint.com/forums/showthread.php?t=184025&page=1&pp=25
Could you find how they did it? I could not repeat it.

Some sites have begun to implement Flash and Java components that cause
popups to happen. Many popup blockers can not contend with popups opened
by Flash or Java. However, many can, and changes are being made to
others to make them capable of blocking popups opened by Flash or Java.

However, in this case, it seems they've decided that lots of people
click on the Web browser window to do things like scroll, so their
source code includes:

window.onclick = popupfunction;

They also tie the popup to every link on the page with:

popupconvertlinks = function()
{
anch = document.getElementsByTagName('a');
for (i = 0; i < anch.length; i++)
{
if (!anch.onclick) anch.onclick = popupfunction;
}
}

Any click on the window (or any link) will trigger their logic which
generates an intermitant popup. So the popups that you see not being
stopped by the popup blocker are, in fact, user-initiated. It's just
that most users don't expect clicking in whitespace on the page to be
"user-initiated" (or cause a popup).

This can be confirmed by typing
"javascript:void(alert(window.onclick));" into the Address Bar when
clicking anywhere in the window initiates a popup.

This is quite annoying and I'm surprised people who would stoop to this
haven't thrown a window.blur() in there as well, to force people to
click the window to give it focus.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top