[jQuery] Problems with the JSON return from the jQuery.ajax() method
Hi,
I'm trying do return a JSON with a $.ajax() method.
here is my entire function:
function carregaMes(d){
if(!(_reunioes["reg"+d.month+d.year])){
$.ajax({
url: "reunioes.jsp",
data: "mes="+d.month+"&ano="+d.year,
async: false,
dataType: "json",
success: function(a){
_reunioes["reg"+d.month+d.year] = a;
}
});
return _reunioes["reg"+d.month+d.year];
} else {
return _reunioes["reg"+d.month+d.year];
}
}
Where _reunioes is an array in window object.
In FF its ok, but in IE its return "undefined". I tried to call a
normal ajax and use the jQuery.httpData() method to covert my xhr into
a JSON, but my IE tell me that in line where jQuery tries to convert
( data = eval("("+data+")"); ) has an error "Indentifier, sequency or
number expected".
Someone can help me?
Thanks very much for help!