There is no 'onclick' event for the iframe, but you can try to catch the document click event in the iframe:
document.getElementById("iframe_id").contentWindow.document.body.onclick = function() { alert("iframe clicked"); }
EDIT Although this does not solve the problem of your cross site, FYI jQuery has been updated to play well with iFrames:
$('#iframe_id').on('click', function(event) { });
Update 1/2015 The iframe explanation link has been removed since it is no longer available.
Note The above code will not work if the iframe is from a different domain than the host page. You can still try using the hacks mentioned in the comments.
Traveling Tech Guy Oct 22 '09 at 20:39 2009-10-22 20:39
source share