JQuery error: XML filter is applied to non-XML value (function (E, F) {return new (o.fn.init)(E, F);})
I am getting this slightly cryptic error message:
XML filter is applied to non-XML value (function (E, F) {return new (o.fn.init)(E, F);})
when I run this code snippet
function justDoIt(arg){
msg = arg开发者_运维问答.msg;
if(arg.ok)
jQuery.(".action-button").each(function(idx,el){jQuery(this).removeClass('enabled');} );
}
arg is a JSON format response form the server.
Anyone knows how to fix this?
On the 4th line there's a .
after jQuery
that you should remove:
if(arg.ok) {
$('.action-button').each(function() {
$(this).removeClass('enabled');
});
}
Which could be simplified to:
if(arg.ok) {
$('.action-button').removeClass('enabled');
}
It happens to me too. I get this error when I call a function of a diferent window:
function anyFunction() {
popup=window.open("...");
popup.someFunction(...);
}
When I execute the code I get the error message: "error: xml filter is applied to non-xml value". I solved thwe issue in this way:
function anyFunction() {
popup=window.open("...");
if(popup.someFunction) {
popup.someFunction(...);
} else {
setTimeout("anyFunction()", 1000);
}
}
Then the function in the popup is only called when the is finded by the opener.
精彩评论