0

in this post How to capture click event with jQuery for iframe? I found a reference on how to execute something when visitors click inside an iframe using jQuery and the following jQuery plugin : https://github.com/finalclap/iframeTracker-jquery.

It consists in selecting the corresponding iframe with a jQuery selector and set a callback function that will execute myFunction :

jQuery(document).ready(function($){
$('.frameid iframe').iframeTracker({
    blurCallback: function(){
        // Execute myFunction
    }
});

});

My problem is that I have an external iframe inside my page which display a form with inputs and 2 buttons: the "Back" button located at the bottom left corner of the iframe and the "Next" button located at the bottom right corner of the iframe.

What I would like to ask is how to execute myFunction (that should record a conversion in google analytics) after recording a number of click (let's say 5 clicks for example) on the "Next" button (or around its region as the "Next" button moves slightly when going forward inside the form).

Hope you can help. Thanks very much.

Community
  • 1
  • 1

1 Answers1

0

You can't interact with third party iframes programatically because it would be an amazing phishing scam.

stevemarvell
  • 981
  • 1
  • 6
  • 16
  • Thanks for your reply. but https://github.com/finalclap/iframeTracker-jquery is doing recording clicks inside an external iframe. I don't want to access the DOM content, just to fire a function after recording a number of clicks on a region inside the iframe. – user2873280 Oct 12 '13 at 06:37
  • Is that doing the job for you? – stevemarvell Oct 12 '13 at 14:18