In ADF application I am using a java script to invoke URL in a new IE window. URL is getting opened in new window, but the control is not coming back to the original url / request, it is just showing processing icon in the ADF application, hence i could not do any operations in my adf application.
Java script used in ADF :
function handleURLLaunch (linkurl) {
loginUrl = linkurl;
if (document.getElementById) {
window.oldOnError = window.onerror;
window._command = loginUrl;
window.onerror = function (err) {
if (err.indexOf('utomation') != -1) {
alert('command execution of ' + window._command + ' disallowed by user.');
return true;
}
else return false;
};
var wsh = new ActiveXObject('WScript.Shell');
if (wsh){
wsh.Run("iexplore -nomerge "+loginUrl,8,true);
return true; // this return statement is not working.
}
window.onerror = window.oldOnError;
}
else
window.open(loginUrl);
}
below HTML code is invoking the same java script and it works fine.
<a href="javascript:void(0);" onClick="handleURLLaunch ('http://google.com'); return false;">Sample URL to open in IE</a>
I am invoking this java script in ADF through java code.
Can any one let me know how to use the call the java script along with href and return statements / or the other way to solve this issue.
Thanks,
Swathi