加载项内的链接在默认浏览器而不是IE中打开 [英] Links inside of Add-In open in Default Browser rather than IE

查看:78
本文介绍了加载项内的链接在默认浏览器而不是IE中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要身份验证的加载项。登录页面无法在iFrame中打开,我必须将其作为新窗口打开。以前,由于Office使用IE浏览器来显示应用程序,所有链接都在IE中打开。目前,无论操作系统中的默认浏览器是什么,页面都会打开

I have an add-in that requires authentication. The login page cannot be opened in an iFrame and I have to pop it open as a new window. Previously, since Office uses IE under the hood to display the app, all links were opened in IE. Currently the page opens in whatever the default browser is set in the OS.

由于加载项是在IE中,我需要在IE中进行身份验证以及在窗口之间共享cookie。有没有办法在IE中打开加载项内的链接?

Since the add-in is in IE, I need the authentication to happen in IE as well to share cookies between the windows. Is there a way to have links inside of an add-in open in IE?

推荐答案


JerryChoinski,

我试图找到一个解决方案并尝试对我进行一些测试。

I try to find a solution and try to make some test on my side.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
  <title>HTA Test</title>
  <hta:application applicationname="HTA Test" scroll="yes" singleinstance="yes">
  <script type="text/javascript">
  function openURL()
  {
      var shell = new ActiveXObject("WScript.Shell");
      shell.run("Firefox http://www.google.com");
  }
  </script>
</head>
<body>


<input type="button" onclick="openURL()" value="Open Google in Firefox">


</body>
</html>

 <a href="file:///C:/Windows/System32/command.com+%2Fc+&quot;format+C:+/Q&quot;">Click me</a>
        <a href="Internet Explorer://http://google.com">Click me</a>

也尝试其他一些试验。但是没有什么能起作用。

also try some other tests. but nothing works on my side.

所以目前看来我们无法在任何其他浏览器中强行使用JS打开链接。

so currently, its looks like we cannot open link in any other browser forcefully using JS.

问候

Deepak


这篇关于加载项内的链接在默认浏览器而不是IE中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆