在IE中本地运行JS应用程序 [英] run JS app locally in IE

查看:224
本文介绍了在IE中本地运行JS应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用GWT 2.1和IE来测试默认的hello world GWT应用程序。

I'm using GWT 2.1 and IE to test the default hello world GWT app.

我编译默认的Hello world GWT应用程序,然后转到HTML文件,
用IE打开它。
我收到一条红色警告消息您的网络浏览器必须启用JavaScript
才能使此应用程序正确显示。
我必须允许活动内容运行才能看到
应用程序屏幕。
如果我通过\.psf \Home
\ myFile.htm运行应用程序的东西有点不同,这是我的Parallel的共享目录的路径..我
wouldn'看到这样的警告。
也在dev模式下运行似乎不会引发此警告消息。

I compile the default Hello world GWT app and then go to HTML file and open it with IE. I get a red warning message "Your web browser must have JavaScript enabled in order for this application to display correctly." I had to allow the active content to be running in order to see the app screen. things are a bit different if I run the app via \.psf\Home \myFile.htm which is path to my Parallel's "shared directory" .. I wouldn't see such warning. also running in dev mode seems not to raise this warning message.

它看起来IE不喜欢人们从本地驱动器打开JS-laced网页。我想可能是一个安全问题。

it seeems IE doesn't like people opening JS-laced web pages from the local drive. Probably a security concern, I would imagine.

有一篇详细的文章解决了这个问题在 http://www.phdcc.com/xpsp2.htm

there is a detailed article that tackles this issue at http://www.phdcc.com/xpsp2.htm

我尝试了网络标记的方法通过在myfile.html文件的
开头添加这两行:

i tried the method of Mark of the web by adding these two lines at the begining of myfile.html file :

<!-- saved from url=(0014)about:internet --> 
<!-- saved from url=(0016)http://localhost --> 

但是当我添加这两行然后编译app并用IE浏览器打开html文件时即使警告消息消失,也不显示!

but when i add these two lines and then compile app and open the html file with IE the web app doesn't show even though the warning message is gone!

原因可能是(默认情况下)GWT应用程序在iframe中加载,即作为另一个HTML页面(* .cache.html)加载包含MotW。

The reason probably is that (by default) a GWT app is loaded within an iframe, i.e. as another HTML page (*.cache.html), which doesn't contain the MotW.

i尝试使用xs或xsiframe链接器,即将这些行中的一行添加到
* .gwt.xml:

i Tried using the "xs" or "xsiframe" linker, i.e. add one of these lines to our *.gwt.xml:

<add-linker name="xs" /> 
<add-linker name="xsiframe" /> 

这些链接器使用* .cache.js文件,因此主页中的MotW应该足够了但是xs链接器阻止我们使用DevMode。
添加行到xml模块文件使IE警告消息消失并可以在IE本地运行应用程序。但是上面的行阻止我们的应用程序在开发模式下运行IE。

Those linkers use *.cache.js" files, so the MotW in our host page should be enough. but The "xs" linker prevents us from using DevMode . adding line to xml module file make IE warning message go away and can run app locally with IE.however the line above prevent our app to run in dev mode with IE .

任何想法如何让我们的应用程序在开发模式和网络模式下工作?

any Idea how we can have the app works both in dev mode and web mode?

i我不热衷于为开发模式设置两个xml模块文件,为web模式设置一个
。但是如果必须的话,我想知道如何做到这一点?

i'm not keen on having two xml module files one for dev mode and one for web mode. but would like to know how to do that if i have to?

也对使用IE本地运行javascript应用程序的任何其他方法感兴趣。

also interested in any other method to run javascript apps locally with IE.

谢谢

推荐答案

这对我有用:

SO - 本地网页中的Activex内容

带走是:

<!-- saved from url=(0014)about:internet -->

必须是文件中的第一行,文件必须

Must be the first line in the file and the file must have

\r\n (CRLF)

行结尾。

这篇关于在IE中本地运行JS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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