My requirement is to develop the file upload functionality using Ajax request. The only condition is that my application works with only IE7. So I cannot use Jquery FormData using which I can submit the form values. I am currently using the following piece of code for my file upload functionality. But it is not working. Can anybody share the code by which I can upload a file and send form data in IE7?
<form id="CreateAttachmentForm" method="post" enctype="multipart/form-data" action="../../uploadFile" >
<input type="file" id="fileupload1" name="fileupload1" accept="image/*,application/pdf" "/>
<contact:contactbutton
id="printButton"
style="position:relative; width:90px; top:27px; height:30px; left:160px;"
textTop="7px"
defaultButton="false"
tabindex=""
accesskey="C"
onClick="return createAttachmentRequest(this.form, this.fileupload1 );"
onfocus="if(event.altKey){click();}">
<u>C</u>reate
</contact:contactbutton>
function createAttachmentRequest(form,fileupload1){
att=form.action;
$.post(att, {fileupload1: fileupload1.value}).done(function(data){
});
return true;