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.
source
share