Forums de discussion
iframe click event not working.
Pankaj Kumar, modifié il y a 7 années.
iframe click event not working.
Regular Member Publications: 101 Date d'inscription: 27/07/14 Publications récentes
Hi,
I have to perform some action on click of iframe.Once i execute the script i get following exception.
getting this exception Dom Exception: Blocked a frame with origin "https://............. " from accessing a cross-origin frame.
Below is the code for script.
var iframe = A.one('iframe.common-structure-video');
iframe.getDOMNode().contentWindow.document.onclick = function(e){
alert(e);
});
Pl. let me know how can i get this working.
Thanks & Regards,
Pankaj Semwal
I have to perform some action on click of iframe.Once i execute the script i get following exception.
getting this exception Dom Exception: Blocked a frame with origin "https://............. " from accessing a cross-origin frame.
Below is the code for script.
var iframe = A.one('iframe.common-structure-video');
iframe.getDOMNode().contentWindow.document.onclick = function(e){
alert(e);
});
Pl. let me know how can i get this working.
Thanks & Regards,
Pankaj Semwal