admin管理员组文章数量:1418380
Is it possible in web page on Internet Explorer to detect if the Google Earth application is installed on the client machine using Javascript?
This page is part of a Trusted Site on an intranet.
Update: detecting it via creating an ActiveX object or any IE specific javascript is fine.
Is it possible in web page on Internet Explorer to detect if the Google Earth application is installed on the client machine using Javascript?
This page is part of a Trusted Site on an intranet.
Update: detecting it via creating an ActiveX object or any IE specific javascript is fine.
Share Improve this question edited Sep 17, 2009 at 7:30 Matthew Lock asked Sep 17, 2009 at 7:19 Matthew LockMatthew Lock 13.6k14 gold badges97 silver badges132 bronze badges2 Answers
Reset to default 5yes it is possible - on your html page you call the init function for the API
<body onload="init()">
bla bla bla
</body>
In a JavaScript, when creating a GE instance for your page, you provide a function pointer for a callback function called on errors
function init()
{
if (ge == null)
{
google.earth.createInstance("content", initCallback, failureCallback);
}
}
finally - in that function you check the error code
function failureCallback(errorCode)
{
if (errorCode == "ERR_CREATE_PLUGIN") {
alert("Plugin not installed")
} else {
alert("Other failure loading the Google Earth Plugin: " + errorCode);
}
}
look at this for a plete working code.
Good luck MikeD
I don't think this works using Javascript. I'm pretty sure Google Earth doesn't install a plugin into Internet Explorer (or any other browser for that matter). So you can forget Javascript.
As you are on a trusted site you may try using ActiveX. I'm not into ActiveX but maybe there's a way to have a deeper look into the client's system.
本文标签: javascriptDetect Google Earth is installed in a web page on Internet ExplorerStack Overflow
版权声明:本文标题:javascript - Detect Google Earth is installed in a web page on Internet Explorer - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745287206a2651571.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论