Detect Click from Remote Iframe

Discussion in 'jQuery' started by briant97, Nov 18, 2010.

  1. #1
    We are trying to detect when an ad is clicked. But the ads are all in iframes hosted on the ad servers sites. We have tried rapping a div but the iframe sits overtop of the div and can't be seen. The only function that comes close is mouseenter but we can't detect when its clicked. This of course has to be cross browser. If anyone has any ideas please let me know.
     
    briant97, Nov 18, 2010 IP
  2. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    #2
    can you try handling document clicks and find its target,
    i haven't tried i though
     
    gapz101, Nov 24, 2010 IP
  3. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #3
    No stats from your ad hoster?
     
    CSM, Nov 26, 2010 IP
  4. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #4
    You could try using Flash object overlay, however, this will only work if your users double click instead of one click:

    Demo

    Download
     
    ThePHPMaster, Dec 5, 2010 IP
  5. walidaly

    walidaly Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Try this
    test jsfiddle.net/4vBRe/

    To detect only the click on iframe then use mouseover event then blur
     
    walidaly, Nov 24, 2012 IP