2
document.getElementById(id).contentWindow.document.addEventListener("click", function() {
     alert("in contentWindow event")}, false);
});

where id is id of my iframe. Alert is coming in firefox but not in chrome. Can anybody suggest why this is not working or any alternative??

Bibhu
  • 4,053
  • 4
  • 33
  • 63
  • possible duplicate of [Detect click inside iframe (same domain/sub domain) in Chrome using jQuery](http://stackoverflow.com/questions/12477917/detect-click-inside-iframe-same-domain-sub-domain-in-chrome-using-jquery) – Michael Laffargue Sep 12 '13 at 07:33
  • Some browsers may block the alerts . Try using some ajax to interact with your server code and make a console log. – Human Being Sep 12 '13 at 07:39
  • I also faced the same and and solved by confirm by onclick works. – Human Being Sep 12 '13 at 07:40

0 Answers0