La llamada $ajax() funciona en Firefox, no en Webkit/Chrome

The following $ajax() call works fine from firefox but returns "error" status text and '0' status in webkit. The url is a cakePHP specific controller action that returns html. The Id passed to the ajax call comes from an option select and is functioning properly in both browsers.

  type : "POST",
  url : "",
  dataType: 'html',
  data: {'itemId':Id},
  success: ajaxSuccess,
  error: ajaxError,
  complete: ajaxComplete
function ajaxComplete(jqXHR, textStatus){
  console.log("complete: " + textStatus);
  console.log("complete: " + jqXHR);
function ajaxError(jqXHR, textStatus, errorThrown){
function ajaxSuccess(result, status, jqXHR){        

Does anyone have any ideas why this would work in firefox and not in Webkit/Chrome? I'm out of ideas.

preguntado el 04 de septiembre de 13 a las 02:09

Chrome: F12 -> Network tab, check the status, headers and response there. -

I wonder how the code shown is called. -

It is quite possible you're running into cross-site restrictions. As @FabrícioMatté said, check the Network tab for more details. -

update url like url : "/controller/controllername/action/", -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.