pop-up blocker jafa code??

I would like to add pop-up blocker to a few of my
web pages. I remember seeing a routine several years ago
where it redefined a newpage or window type function.
Can anyone help me prevent popups?


  • Well, considering that the easiest thing to do would be not to use popups, I'd guess you have no control over them. Which in turn leads me to believe you're not supposed to get rid of them.

    ...so this didn't come from me, right?

    Anyway, I believe that all you have to do is redefine the function. Since open is a method of window anyway, all you have to do is:

    function open() {
    return false; //to allow for probable weirdness

    It'll only work if it's defined before it gets called, so put it as high as you can.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion