Is it possible to block popups?

D

Daniel Pope

Dear All,

Though I'm not new in HTML, I have to solve a problem that appears to be
unexpectedly difficult at this point.
I'm writting a banner exchange program but I cannot cope with the following
problem:
If the banners have incorporated popups (popunder), is it possible to
disable them before they start on the user's remote computer (in the client
browser)?
If yes, what html or javascirpt statement can be used?
Any hints will be greatly appreciated.


Daniel P.
 
J

Jukka K. Korpela

Daniel Pope said:
Though I'm not new in HTML, I have to solve a problem that appears to
be unexpectedly difficult at this point.

You seem to have a limited understanding of what HTML is and what it is
not. It is a poor lonesome data format, not a programming language.
I'm writting a banner exchange program

There's probably no catastrophic shortage of such programs in the
universe. Are you sure you can't find anything productive to do?
If the banners have incorporated popups (popunder), is it possible to
disable them before they start on the user's remote computer (in the
client browser)?

Surely. This is one of the first things you should learn when starting to
use a browser.
If yes, what html or javascirpt statement can be used?

Automatic popups have probably been created using some flavor of
JavaScript. There's nothing you can do in HTML about them except remove
the constructs that invoke the JavaScript code. In JavaScript, you can
remove that code itself.
Any hints will be greatly appreciated.

Disable JavaScript in your browser, and start thinking that this is what
sensible users normally do, and (obHTML:) write your HTML accordingly.
 
M

Mitja

Daniel Pope said:
Dear All,

Though I'm not new in HTML, I have to solve a problem that appears to
be unexpectedly difficult at this point.
I'm writting a banner exchange program but I cannot cope with the
following problem:
If the banners have incorporated popups (popunder), is it possible to
disable them before they start on the user's remote computer (in the
client browser)?

No. You can, of course, prevent them to incorporate such popups at all, by
only accepting "harmless" banner file formats (i.e. plain pictures).
 
R

Richard

You seem to have a limited understanding of what HTML is and what it is
not. It is a poor lonesome data format, not a programming language.
There's probably no catastrophic shortage of such programs in the
universe. Are you sure you can't find anything productive to do?
Surely. This is one of the first things you should learn when starting to
use a browser.
Automatic popups have probably been created using some flavor of
JavaScript. There's nothing you can do in HTML about them except remove
the constructs that invoke the JavaScript code. In JavaScript, you can
remove that code itself.
Disable JavaScript in your browser, and start thinking that this is what
sensible users normally do, and (obHTML:) write your HTML accordingly.

The question does not involve the user's browser.
He is asking what can be done to keep 3rd party banners from creating popups
on the site.
 
R

Richard

Daniel said:
Dear All,
Though I'm not new in HTML, I have to solve a problem that appears to be
unexpectedly difficult at this point.
I'm writting a banner exchange program but I cannot cope with the
following problem:
If the banners have incorporated popups (popunder), is it possible to
disable them before they start on the user's remote computer (in the
client browser)?
If yes, what html or javascirpt statement can be used?
Any hints will be greatly appreciated.

Daniel P.


I'm no expert, but popups are generally created with code within the site's
page.
You may be able to write some script that will deny a banner if there is
anything more than the image itself.
As javascript is client side and can be turned off, you may want to look at
php or cgi.
 
W

Wÿrm

The question does not involve the user's browser.
He is asking what can be done to keep 3rd party banners from creating popups
on the site.

ofcoz it CAN involve user browser! If you dumb-o think you can kill
javascript etc with php or cgi etc you better just go have change your
brains in a way, because as long as browser client enable javascript junk
you are stuck with it. To block javascript is 1 way, to use popup blockers
are another way, or use proxy 3rd way etc... So dont bother answer when you
have no clue about things. Stick on things you know (what are very limited
what it shows to me.)
 
T

Toby A Inkster

Wÿrm said:
ofcoz it CAN involve user browser! If you dumb-o think you can kill
javascript etc with php or cgi etc you better just go have change your
brains in a way,

I'd easy to disable scripts in PHP or CGI:

#!/usr/bin/perl
$htmlfragment = `cat somefile.html`;
$htmlfragment =~ s/\-\-/==/ig;
$htmlfragment =~ s/\<script /\<\!\-\- /ig;
$htmlfragment =~ s/\<\/script\>/ \-\-\>/ig;
print $htmlfragment;
 
W

Wÿrm

I'd easy to disable scripts in PHP or CGI:

#!/usr/bin/perl
$htmlfragment = `cat somefile.html`;
$htmlfragment =~ s/\-\-/==/ig;
$htmlfragment =~ s/\<script /\<\!\-\- /ig;
$htmlfragment =~ s/\<\/script\>/ \-\-\>/ig;
print $htmlfragment;

oops, my bad :) I think I was bit too tired when I was thinking here
earlier.
 
J

Jukka K. Korpela

I only quoted the first few lines, i.e. the most important lines, of your
message, and I must say that I cannot disagree with them. I almost feel
compelled to say: Me too!

(Please do not stop upside down fullquoting before you have a
contribution of your own to make.)
 
K

Kevin Scholl

Jukka said:
You seem to have a limited understanding of what HTML is and what it is
not. It is a poor lonesome data format, not a programming language.




There's probably no catastrophic shortage of such programs in the
universe. Are you sure you can't find anything productive to do?




Surely. This is one of the first things you should learn when starting to
use a browser.




Automatic popups have probably been created using some flavor of
JavaScript. There's nothing you can do in HTML about them except remove
the constructs that invoke the JavaScript code. In JavaScript, you can
remove that code itself.




Disable JavaScript in your browser, and start thinking that this is what
sensible users normally do, and (obHTML:) write your HTML accordingly.

How is disabling Javascript sensible? Javascript in and of itself is
generally harmless, and in this day and age an important part of many
useful sites. Disabling is certainly not the "norm", and by and large
unnecessary. Most browsers now include effective pop-up blockers, and
for the one important browser which doesn't (IE), there are numerous
third-party add-ons available.

--

*** Remove the DELETE from my address to reply ***

======================================================
Kevin Scholl http://www.ksscholl.com/
(e-mail address removed)
 
K

Kevin Scholl

Jukka said:
I only quoted the first few lines, i.e. the most important lines, of your
message, and I must say that I cannot disagree with them. I almost feel
compelled to say: Me too!

You didn't quote my message at all, but the "so-and-so wrote" lines make
it appear that you intended to.
(Please do not stop upside down fullquoting before you have a
contribution of your own to make.)

Huh?

--

*** Remove the DELETE from my address to reply ***

======================================================
Kevin Scholl http://www.ksscholl.com/
(e-mail address removed)
 
M

Mitja

Toby A Inkster said:
I'd easy to disable scripts in PHP or CGI:

#!/usr/bin/perl
$htmlfragment = `cat somefile.html`;
$htmlfragment =~ s/\-\-/==/ig;
$htmlfragment =~ s/\<script /\<\!\-\- /ig;
$htmlfragment =~ s/\<\/script\>/ \-\-\>/ig;
print $htmlfragment;

<body
onload="javascript:window.open('http://www.ads.com/britneynaked.html')">

Not sure if window.open is the right method, but you get the drift.
And there are probably more ways around it.
 
T

Toby A Inkster

Mitja said:
<body
onload="javascript:window.open('http://www.ads.com/britneynaked.html')">

Not sure if window.open is the right method, but you get the drift.
And there are probably more ways around it.

It's true that would get past my script, but mine was supposed to be just
a simple example. If you'd prefer...

#!/usr/bin/perl
$htmlfragment = `cat somefile.html`;
$htmlfragment =~ s/\-\-/==/ig;
$htmlfragment =~ s/\<script /\<\!\-\- /ig;
$htmlfragment =~ s/\<\/script\>/ \-\-\>/ig;
$htmlfragment =~ s/\=\s*([\'\"]?)javascript\:/\=\1coffeescript\:/ig;
print $htmlfragment;

Again, not tested. Probably a few false positives there, but it will
replace 'javascript:' pseudo-URLs with a harmless 'coffeescript:'.
 

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,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top