这个openlaszlo代码有什么问题?
问题描述:
我想知道什么是错在此代码这个openlaszlo代码有什么问题?
<canvas>
<view y="50" width="100%" height="300" bgcolor="blue" onmousedown="res.apply()" onmouseup="res.remove()">
<resizestate name="res"/>
<dragstate name="drg"/>
<text width="100%" bgcolor="gray" onmousedown="parent.drg.apply()" onmouseup="parent.drg.remove()">Drag here</text>
<html id="ht" src="text.html" x="15" y="15" width="${parent.width - 30}" height="${parent.height - 30}"/>
</view>
</canvas>
的代码被编译,但我无法看到在SWF版本的HTML,但我能看到DHTML版本的HTML。我试图指定的URL也依然没有结果
答
它看起来像<HTML>标签功能OpenLaszlo中的5.0(躯干)的某些基于Webkit的浏览器(Chrome和Safari)的SWF10运行时坏,但也有其他的问题以及。我修改一下代码做一些测试:
<canvas>
<button text="OpenLaszlo" onclick="ht.setAttribute('src', 'http://www.openlaszlo.org')" />
<button y="40" text="test.html" onclick="ht.setAttribute('src', 'test.html')" />
<view y="200" width="100%" height="300" bgcolor="blue" onmousedown="res.apply()" onmouseup="res.remove()">
<resizestate name="res"/>
<dragstate name="drg"/>
<text width="100%" bgcolor="gray" onmousedown="parent.drg.apply()" onmouseup="parent.drg.remove()">Drag here</text>
<html id="ht" src="http://www.openlaszlo.org" x="15" y="15" width="${parent.width - 30}" height="${parent.height - 30}"/>
</view>
</canvas>
以下是我与此代码为SWF10运行时看到的结果:
- InternetExplorer的9,18铬和Opera 12 :这两个页面(本地test.html和OpenLaszlo)都显示在iFrame中。
- Firefox:显示远程网站OpenLaszlo.org,但不显示本地test.html。
- 5.1的Safari和Chrome 21:这两个页面不在的iFrame
我会提交一个OpenLaszlo Jira错误,并发送消息到laszlo-dev开发者邮件列表,参照该讨论中所示。
+0
谢谢你raju.I也能够在OL 4.9中重现这一点。我将尝试以编程方式创建iframe并查看此问题。 – karthick 2012-08-10 09:52:21
答
自2006年以来,我一直在开发OpenLaszlo,我个人在尝试在SWF运行时使用OpenLaszlo <html>标签的经验是,我加载到它的一半页面工作,吨。我遇到过即使Google的简单网页也无法运行的情况,这是一个非常不稳定的课程,我不推荐使用它。
你的代码没有问题。看起来像一个OpenLaszlo错误。 – 2012-08-10 09:14:13