Tengo un código jQuery que arroja un error realmente extraño. Google Chrome llama el error Uncaught TypeError: Illegal invocation
y dice que es lanzada en c.extend.param.e
de la línea jquery-1.4.4.min.js 144, pero trazas inversas a mi llamada $ .ajax, que se ve así:
$.ajax({
url: target,
type: method,
dataType: 'json',
data: sendData,
success: function(result) {
if (result.redirect) {
window.location = result.redirect;
}
else {
for (var i in result) {
if ($(i).size()) {
$(i).html(result.i);
}
}
}
}
});
Otra pregunta en SO que se parece un poco a esto lo atribuye al uso de $
sin encerrarlo en una función jQuery correctamente, pero estoy bastante seguro de que no es mi error esta vez, porque he tenido cuidado.
Gracias, eso se arregló. –
No hay problema :) Tomó solo 5 minutos (bueno, si sabe lo que necesita buscar) –
¿Dónde event.preventDefault(); datos var = $ .extend ({ de referencia: window.location, <- window.location es un objeto, debería haber window.location.href href: $ (este) .attr ('href') } , options.linkData); loadPage (options.linkUrl, options.linkMethod, data); vienen? El asker no incluyó ese código en esto en su pregunta ... –