What you have there should be working.  Perhaps the json response is
not properly formatting.  Try adding an error callback, or using the
global ajaxError hook, and see if that's the problem.

Mike

On Jan 5, 8:20 pm, Scott Brady <dsbr...@gmail.com> wrote:
> I'm having an issue using the jquery form plug-in.  The form gets
> submitted just fine (I can see the response in Firebug).  However, it
> looks like my success callback method isn't being called.
>
> Here's the basic JS code for the form submit in the "document.ready" section.:
>                // Add form binding
>                var addOptions =
>                {
>                        dataType: 'json',
>                        resetForm: true,
>                        success: processAdd
>                };
>
>                $("#addForm").ajaxForm(addOptions);
>
> And, here's the callback function:
> function processAdd(responseData, statusText)
> {
> alert(responseData);
>
> }
>
> I've tried changing the success be an inline function declaration
> (success: function(responseText){ ... etc) but that didn't change it.
>
> Would using ajaxSubmit() rather than ajaxForm() work better?  Or, is
> there something I'm actually doing wrong that you can see?
>
> --
> -----------------------------------------
> Scott Brady

Reply via email to