I've got a problem with the dojo xhrGet object. I try to make a function from the dojo examples and it is working on firefox and the other browsers except ie6 and ie7. If I want to see the page it says a javascript error (Requested element is not an object, or something) and the two div element not appears. Here is the code:
var ajaxLoader = function(aid,aurl){
var contentNode = dojo.byId(aid);
dojo.xhrGet({
url: aurl,
handleAs: "text",
load: function(data,args){
dojo.fadeOut({
node: contentNode,
onEnd: function(){
contentNode.innerHTML = data,
dojo.fadeIn({node: contentNode}).play()
}
}).play();
},
error: function(error,args){
console.warn("error!",error);
}
})
}
var contentNode = dojo.byId(aid);
dojo.xhrGet({
url: aurl,
handleAs: "text",
load: function(data,args){
dojo.fadeOut({
node: contentNode,
onEnd: function(){
contentNode.innerHTML = data,
dojo.fadeIn({node: contentNode}).play()
}
}).play();
},
error: function(error,args){
console.warn("error!",error);
}
})
}
I try a lot of things but still not working.
Sorry my bad english :)
