Try this solution:

http://www.webtoolkit.info/    ---->    Ajax file upload
http://www.webtoolkit.info/ajax-file-upload.html

Anyone have any idea how to do a file upload using ajax?
If I do this using the normal submit it works just fine but having it call the dosubmit function and I get the form data but no file. ($_FILE is empty with no errors)
function dosubmit(url)
{
  // append extension to form processor to keep chinese out of your stuff
new Ajax.Updater( 'result', url +".php", { method: 'post', parameters: $('myform').serialize(), onSuccess: fill_in, onFailure: ajax_err} );
}

<form name='anisForm' id='myform' action='image_upload' method='post' enctype="multipart/form-data">
  <fieldset>
    <legend>Step 3: Provide An Image</legend>
<label id='labfldr_image' for='ajfldr_image'>Choose A Folder Cover Image:</label> <input type='file' name='fldr_image' size='81' maxlength='256' id='ajfldr_image'>
    <input type='hidden' name='MAX_FILE_SIZE' value='10M'>
  </fieldset>
<input type='button' id='submit' onclick='dosubmit("image_upload")' value='Save'>
    <!-- <input type='submit' id='submit' value='Save'> -->
    <input type='reset' value='Reset'>
</form>
--
You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.

--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prototype-scriptaculous+unsubscr...@googlegroups.com.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
Visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to