SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Sep 2005
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stopping Popups Via Javascript

    Okay, on my Web site I have an IFRAME tag where advertisers can put their adcode. Unfortunately, some advertisers like to put popups there, which is not good. My question is.... Is there anyway to put javascript on my page so no popups will come up?

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Javascript can't affect frames loaded from a different domain so you probably can't block it from within your page.

    The usual way of blocking popups using javascript is:

    window.open = null;
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •