我想加载一个包含一些dojo代码的页面时遇到了问题。加载的页面不显示任何信息。Jquery和Dojo DataGrid问题
我所加载的网页,index.html的样子说:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js" djConfig="parseOnLoad: true">
//to fill
</script>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css"/>
</head>
<body>
<div id="mainFrame">
<script type="text/javascript" >
$('#mainFrame').load('/Page.html');
</script>
</div>
</body>
<html>
我的第二页包含的代码来显示一个DataGrid:当我运行这段代码Pahe.html
<html>
<head>
<link rel='stylesheet' type='text/css' href='http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojox/grid/resources/claroGrid.css'/>
<script type="text/javascript" >
dojo.require("dojox.grid.DataGrid");
dojo.require("dojo.data.ItemFileReadStore");
function prepare() {
var data0 =[{FristName:'jean',LastName:'edu',Course:'english'}];
var store0 = new dojo.data.ItemFileReadStore({
data: {
items: data0
}
});
var grid0 = new dojox.grid.DataGrid({
store: store0,
structure: [
{field: 'FirstName', name: 'FirstName', width:'auto'},
{field: 'LastName', name: 'LastName', width:'auto'},
{field: 'Course', name: 'Course', width:'auto'}
],
rowsPerPage: 20,
clientSort : true,
rowSelector : '10px'
}, "grid0");
grid0.startup();
}
dojo.addOnLoad(prepare);
</script>
</head>
<body>
<div id="grid0"/>
</body>
</html>
在浏览器中,我看到了。然而,我看到与谷歌浏览器的前景工具,浏览器加载的数据网格dojo ...
我认为这是一个jquery的负载问题,因为如果我添加代码来加载脚本在页面.html',我可以看到一些东西...我客人说jquery和dojo出了问题...
你能帮我解决吗?
由于提前,
蝙蝠
我改变了代码(在我的主题上编辑)。但我仍然有这个问题。 – user376112 2011-05-06 13:36:14