Is it possible to detect a user click event in a popup?

I can detect a user click event in a popup if the current url and popup url are in the same domain using the following code.

var myWindow = window.open("abc.html","MsgWindow", "width=500","height=600");
$(myWindow).on('click', 'a', function() {alert('a')});

But is it possible to determine user activity from an external URL, as shown below.?

var myWindow = window.open("http://google.com","MsgWindow", "width=500","height=600");
$(myWindow).on('click', 'a', function() {alert('a')});

The second snippet doesn't work for me. How can I make it work.

Thanks in advance.

+4
source share
1 answer

No, you cannot refuse SOP (policy of the same origin) http://en.wikipedia.org/wiki/Same-origin_policy

: - . . . .

+2

All Articles