Hi All,

Hoping someone can help me out with this, been stuck on it for a while:

I'm using the latest version of the jquery form plugin (from MAlsup) for file uploading. The upload works: the server call happens, the file data makes it there and the server returns a value, in this case just a number (as plain text). I've been unable to get that returned value to show up in the success function. Maybe someone knows what I'm missing. Here's my latest attempt:

html:

<div id="upload">
<form name="uploadForm" action="myhandler.php" method="post" enctype="multipart/form-data">
       <input type="hidden" name="username" value="" />
       <input type="hidden" name="token" value="" />
       <input type="file" name="dataFile" /><br/>
       <input type="submit" value="OK" />
   </form>
</div>

js:

this.$upload = $('#upload');

$('[name=uploadForm]', this.$upload).ajaxForm({
   clearForm: true,
   iframe: true,
   beforeSubmit: function(a,f,o) {
       // tested stuff in here, it works
   },
   success: function(data) {
       alert('made it here'); <!-- this never fires !!
   }
});


I've tried using dataType:'xml' and dataType:'json', no luck.

I've also tried returning some js from the server in a textarea, as the file upload code examples show, for example:

<textarea>alert("hi");</textarea>

no luck.

Anyone?

TIA,
Jack


Reply via email to