i have a problem with jquery form plugin. I try to upload a file asynchronously but it does not submit the form. html markup and javascript code are like below
<form id="fileUploadForm" method="post" action="Default.aspx" enctype="multipart/form-data">
<input type="text" name="filename" />
<input type="file" id="postedFile" name="postedFile" />
<input type="button" value="Submit" onclick="UploadFile();" />
</form>
$(document).ready(function() {
$('#fileUploadForm').ajaxForm();
});
function UploadFile() {
var options =
{
url:"Default.aspx",
beforeSend: ShowRequest,
success: SubmitSuccesfull,
error:AjaxError
};
$("#fileUploadForm").ajaxSubmit(options);
return false;
}.
I have another test form it has only a textbox in it and it works fine. Also when i comment the input type="file"... line the above form works fine too. What is the problem with input type file? Any Idea?