Is it possible to block popups?

Discussion in 'HTML' started by Daniel Pope, May 17, 2004.

  1. Daniel Pope

    Daniel Pope Guest

    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.
     
    Daniel Pope, May 17, 2004
    #1
    1. Advertising

  2. "Daniel Pope" <> wrote:

    > 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.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, May 17, 2004
    #2
    1. Advertising

  3. Daniel Pope

    Mitja Guest

    Daniel Pope <>
    (news:Ot_pc.507045$Ig.107036@pd7tw2no) wrote:
    > 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).

    > If yes, what html or javascirpt statement can be used?
    > Any hints will be greatly appreciated.
    >
    >
    > Daniel P.
     
    Mitja, May 17, 2004
    #3
  4. Daniel Pope

    Richard Guest

    Jukka K. Korpela wrote:

    > "Daniel Pope" <> wrote:


    >> 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.


    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.
     
    Richard, May 17, 2004
    #4
  5. Daniel Pope

    Richard Guest

    Daniel Pope wrote:

    > 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.
     
    Richard, May 17, 2004
    #5
  6. Daniel Pope

    Wÿrm Guest

    <snip>
    > 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.)
     
    Wÿrm, May 17, 2004
    #6
  7. Wÿrm wrote:

    > 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;

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, May 17, 2004
    #7
  8. Daniel Pope

    Wÿrm Guest

    <snip>
    > 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.
     
    Wÿrm, May 17, 2004
    #8
  9. Kevin Scholl <> wrote:

    > Jukka K. Korpela wrote:
    >> "Daniel Pope" <> wrote:
    >>
    >>
    >>>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 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.)

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
     
    Jukka K. Korpela, May 18, 2004
    #9
  10. Daniel Pope

    Kevin Scholl Guest

    Jukka K. Korpela wrote:
    > "Daniel Pope" <> wrote:
    >
    >
    >>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.


    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/

    ------------------------------------------------------
    Information Architecture, Web Design and Development
    ------------------------------------------------------
    We are the music makers, and we are the dreamers of
    the dreams...
    ======================================================
     
    Kevin Scholl, May 18, 2004
    #10
  11. Daniel Pope

    Kevin Scholl Guest

    Jukka K. Korpela wrote:

    > Kevin Scholl <> wrote:
    >
    >
    >>Jukka K. Korpela wrote:
    >>
    >>>"Daniel Pope" <> wrote:
    >>>
    >>>
    >>>
    >>>>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 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/

    ------------------------------------------------------
    Information Architecture, Web Design and Development
    ------------------------------------------------------
    We are the music makers, and we are the dreamers of
    the dreams...
    ======================================================
     
    Kevin Scholl, May 19, 2004
    #11
  12. Daniel Pope

    Mitja Guest

    Toby A Inkster <>
    (news:p) wrote:
    > Wyrm wrote:
    >
    >> 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;


    <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.
     
    Mitja, May 19, 2004
    #12
  13. Mitja wrote:

    > <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:'.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, May 19, 2004
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Showjumper
    Replies:
    1
    Views:
    711
    Showjumper
    Mar 19, 2005
  2. Noozer

    Block DIV within a block DIV?

    Noozer, Jan 6, 2005, in forum: HTML
    Replies:
    3
    Views:
    11,394
    Mitja
    Jan 6, 2005
  3. morrell
    Replies:
    1
    Views:
    975
    roy axenov
    Oct 10, 2006
  4. Moe Sisko
    Replies:
    1
    Views:
    868
    George
    Aug 4, 2008
  5. preet

    BLOCK POPUPS

    preet, Sep 28, 2008, in forum: Javascript
    Replies:
    1
    Views:
    96
    Thomas 'PointedEars' Lahn
    Sep 28, 2008
Loading...

Share This Page