> I am using the ajaxForm() to submit a form and the success function
> that is defined in the options array is firing 3 times. Any ideas?
>
> Code:
>
> var options = {
>         target:        '.updateStatus',
>                 beforeSubmit:  updStatus,
>         success:       showResponse,
>         url:       'saveAdmin.php',
>         type:      'post'
>
>     };
>
>         $('.editProviderType').ajaxForm(options);
>
> //updStatus Func()
> function updStatus(formData, jqForm, options) {
>         $('form.editProviderType').slideUp();
>         var spanName = 'span#TypeName'+formData[3]['value'];
>         $(spanName).text(formData[0]['value']);
>
>         return true;
>
> }
>
> //showResponse funct()
> function showResponse(responseText, statusText)  {
>
>         $('form.editProviderType').resetForm();
>
>         //uiMessage('success','Provider Type Edited Successfully');
>
>         console.log('success');
>
>         return true;
>
> }



That is the expected behavior if your 'target' option refers to
multiple elements.  Are there three elements with the 'updateStatus'
class?

Reply via email to