Hi Mike, I've faced exactly the same problem. When I upload a file via the
.ajaxFrom all seems to be well, except that success function doesn't fire.
But json response that the server returns is ok. As it was written in Jquery
Form code samples I return json in <textarea> tags. I've searched google and
http://www.malsup.com but found nothing that could solve the problem. Can
you help me?

Thanks in advance.


malsup wrote:
> 
> Shelane,
> 
> Since it is not possible to upload files via ajax the form plugin manages
> the process with a hidden iframe technique.  So you won't see the get/post
> trace in Firebug's console.  However, callbacks *should* be called as
> expected.  Can you post a link to the page in question?
> 
> Josh, ajaxSubmit is used to submit a form immediately.  ajaxForm prepares
> the form and invokes ajaxSubmit on your behalf when the user clicks the
> submit button.
> 
> Mike
> 
> On Fri, Feb 15, 2008 at 2:17 PM, Shelane <[EMAIL PROTECTED]> wrote:
> 
>>
>> When a form is submitted - specifically with a file upload - with the
>> ajax form plugin, firebug doesn't show a submission, nor any return.
>> This is making it difficult to debug, hince the question.  I know that
>> my files are being uploaded, but the success function doesn't seem to
>> be running:
>>
>> addDoc = function(data){
>>        $('#docform').resetForm();
>>        $('#formmodal').jqmHide();
>>        alert(data);
>>        stripe('#documents');
>>        removeDoc('#row' + doc);
>> }
>>
>> fileValidate = function(formData){
>>        if(!document.docform.attachment.value)
>>                return false;
>>        else
>>                alert('about to submit');
>> }
>>
>> $('#docform').ajaxForm({success: addDoc, beforeSubmit: fileValidate,
>> dataType: 'json'});
>>
>> Am I missing something.
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ajax-form-plugin-question-tp15508281s27240p15547225.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to