I had a function in my application which calls other domain url, I'm struggling to open that url in a new window when the function is executed.
sample code:
$('#btn').onClick(function(){ //This code is in my application.
//callOtherfn is a function from external javascript code that i cant change,
//because that is from other source.
callOtherfn({
'param1':'param1',
'param2':'param2'
})
});
//external javascript library sample.js
function callOtherfn(params){
top.window.location = "www.sample.com";
}
Now my question is, can it be possible to open "www.sample.com" in a new window after calling "callotherfn" without disturbing my app? Right now it is opening in the same window.