我想加載一個包含一些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