I am trying to upload the following form
<form id="filesend" enctype="multipart/form-data" method="post" action="upload.php"> Choose the file you want to send <br> <input name="file" type="file"><br><input type="submit"></form>
using the following jquery code
<script>
$('document').ready(function() {
var options= { target:'#close'}
$('#filesend').submit( function (){
$(this).ajaxSubmit(options);
return false;
})})
</script>
but nothing happens and the form submits like a normal html form and navigates to upload.php and yes I have included the plugin. Any ideas as to where I might be going wrong.
Edit
I just noticed something intresting. If i go through chrome's debugger and watch every step of the execution the file gets uploaded to the database twice. But going through it without any breakpoints results in it only being uploaded once.