dojo 1.8:将dojo-laced html文件加载到contentpane中 [英] dojo 1.8: loading dojo-laced html files into contentpane
问题描述
我可以使用href将非dojo html加载到内容窗格中。
任何想法如何将dojo-laced html文件动态加载到contentpanes? / p>
当我加载dojo-laced html文件时,我可以看到html标签中的文本,而不是dojo脚本中的文本。我在哪里出错?
我在这里提供的脚本是: -
widget.set('href','dojotext.html')
jsfiddle中的另一个问题是按钮1不会更新,不像我的环境。
有趣的是,边框容器和窗格不显示,不像我的环境。 / p>
以下是我在jsfiddle中的链接
- 测试加载的主页
- 要加载的dojo内容
请指教。感谢
Clement
首先,您的 ContentPanes 和 BorderContainer 没有显示,因为你不解析它们。
在您的代码中,您可以手动运行解析器:
ready(function(){
parser.parse();
// ...
});
关于您的第一个问题,您似乎没有阅读文档:
< div id =foodata-dojo-type =dijit / layout / ContentPanehref = /some/page.html\">
< script type =dojo / method>
alert('Hello World!');
< / script>
< / div>
代码来自: ContentPane文档
Hi Any idea how I can load dojo-laced html file dynamically into contentpanes?
I am able to load non-dojo html into content pane using href.
When I loaded dojo-laced html file, I can see text in html tags but not text in dojo scripts. Where did I go wrong?
The scripts I put here are:-
widget.set('href','dojotext.html')
Another problem in jsfiddle is that pressing button 1 will not update, unlike in my environment.
and funny thing is that border container and comtent panes are not displayed, unlike in my environment too.
Here are my links in jsfiddle - main page for testing loading - dojo content to be loaded
Please advise. Thanks Clement
First of all, your ContentPanes and BorderContainer are not being displayed because you're not parsing them.
In your code, you can run parser manually:
ready(function () {
parser.parse();
// ...
});
Regarding your first question, it seems that you didn't read the documentation:
<div id="foo" data-dojo-type="dijit/layout/ContentPane" href="/some/page.html">
<script type="dojo/method">
alert ('Hello World!');
</script>
</div>
Code from: ContentPane documentation
这篇关于dojo 1.8:将dojo-laced html文件加载到contentpane中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!