我在Dojo的內容窗格出現問題,它出現在第二個內容然後消失。我收到以下錯誤:Dojo - 「試圖註冊id爲id = centerPane的小部件,但該ID已註冊」
Uncaught ReferenceError: dijit is not defined index.php:22
dojo/parser::parse() error
Error
arguments: undefined
get stack: function() { [native code] }
message: "Tried to register widget with id==centerPane but that id is already registered"
set stack: function() { [native code] }
type: undefined
__proto__: d
我來回答防空火炮在那裏你可以摧毀所有註冊的ID,但我仍然得到錯誤,當我嘗試。
var ids = ["contentPane"];
dijit.registry.forEach(function(w){
if(dojo.indexOf(ids,id)){
w.destroyRecursive();
}
});
和
var ids = ["contentPane"];
dijit.registry.forEach(function(w){
if(dojo.indexOf(ids,1)){ // 1 will be yourid it will get destroy
w.destroyRecursive();
}
});
我怎麼解決這個問題?