I am having a problem,

The callback function I am passing to the jquery post request is not
executing the success callback on a successful reply from my servlet:

Here are some code snippets of what I am trying to do:

top of my file:
if (Ajax == null || typeof(Ajax) != "object") { var Ajax = new Object
();}

Ajax.callBack = function(data, textStatus) {
        alert('in callback');
}

Ajax.call = function (url, formValues) {
     $.post(url, formValues ,function(data, textStatus) { Ajax.callBack
(data, textStatus); }, "html");
}

I have also tried:

Ajax.call = function (url, formValues) {
     $.post(url, formValues ,Ajax.callBack, "html");
}

I examined the return of the $.post call and the XMLHttpRequest is
returning a status of 200, and the responseText variable has the
correct data. (I have examined them using FireBug). Also no exeception
is being thrown.

I have found if I use just this, the alert pops up

Ajax.call = function (url, formValues) {
     $.post(url, formValues ,function(data, textStatus) { alert
("hello"); }, "html");
}


Thanks in advance

Reply via email to