Forums

Home » Alloy UI » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
Pankaj Kumar
iframe click event not working.
January 3, 2017 11:07 PM
Answer

Pankaj Kumar

Rank: Junior Member

Posts: 44

Join Date: July 27, 2014

Recent Posts

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