Hi dgt, I think the problem is the following:
ajaxForm uses Ajax to send the data (XMLHttpRequest), but XMLHttp does NOT support file uploading, so the way to send a file (image or whatever) is to use an iframe. You can manipulate the iframe with javascript by copying the <input type="file"/> elements or some other way. Also, just to remind you - if you upload data the form should be enctype="multipart/form-data" and method="post". Hope that helps. Regards, Emil Ivanov On Oct 16, 5:13 am, dgt <[EMAIL PROTECTED]> wrote: > It was difficult to decide where I should post this. I think the issue > is with jQuery though, I'm certainly no pro with jQuery, having only a > few months experience. > > Let me explain my problem. > > I'm using a form which has a file upload, and also sends standard > text data. This form I wish to be ajax'ed. > > I'm using this code: > > $("#node-form").ajaxForm(function(){alert("Thank you for your > submission!");}); > > If I upload an image, I'll still get that message, but the image is > not uploaded to image.module in drupal (which handles image thumbnail > creation etc) . In fact, it's not uploaded at all. > > If I strip the file field, and use a different content type (Story > type for those who use Drupal, which just creates a page), it works > beautifully. I therefore deduced there's something amiss with file > uploading. How can I send an image with the Form Plugin, so Drupal can > then generate what it needs. > > I have searched the list and the internet, but do not understand what > to do. Please help if you can.