Reputation: 23
is there any way to use javascript to open a link in an external program and not(!) in the web browser?
Background: From CRM2015 on-premise i want to open a Mail in Lotus Notes.
script:
<html>
<body>
<p onclick="myFunction()">Click me</p>
<script>
function myFunction() {
window.open("notes:///server/file");
}
</script>
</body>
</html>
What happens: the mail opens in Lotus Notes -> good
But also an additional tab in IE11 occurs, blank page and link in address bar -> bad
What should happen: mail will open in Lotus Notes but no additional tab or windows in IE11.
Is there any way to solve my issue?
Thanks a lot for you help and have a great weekend!
Upvotes: 2
Views: 4610
Reputation: 92792
If you want to navigate to an external protocol via JS, do it the same way you'd navigate to a HTTP URL:
function goSomewhere() {
window.location = "notes:///server/file";
}
Sane browsers should 1. stay on the same page, and 2. launch the external program (emphasis on should and no guarantees on insane browsers - e.g. IE8 and below).
Upvotes: 2