I have two web applications where I need to send some text data from one applicatio to another.
From my first app trying to open second app using window.open(url). from second app calling below method on click event that is send_report_data
which will have all the data and then pasing to parent window.
function send_report_data(form_data){
if(opener != null){
var test_data = form_data;//It has text data
opener.globalNotify(test_data);//passing to callback
window.close();//Once passed closing current window
}
}
var globalNotify = function callback(finaldata){
$('#post_data_div').html(finaldata);//Recieved text data assigning to text area
$("#reportingRte").html(finaldata);//Recieved text data assigning to div element
}
But getting below error at this line opener.globalNotify(test_data);
custom.js:1162 Uncaught DOMException: Blocked a frame with origin "http://one.example.com" from accessing a cross-origin frame.
I tried figuring out from similar posts but not working yet.
Any help would be appreciated.