I have a form in which user inputs its data along with its image. This form will be in a jquery dialog. I want to know if its is possible that if I upload an image and then send it to server for saving on hard drive after that without loosing that dialog print a message your file uploaded. If yes then how i can use jquery ajaxform plugin. Im using asp.net mvc.
What i have tried is as follows
My View
<div id="dialog" title="Dialog Title" style="display: none">
<div id="Jobs">
<form id="frmupload" enctype="multipart/form-data" method="post">
<input id="File1" type="file" name="file" />
<input id="Button1" type="submit" value="Upload" name="button" />
</form>
</div>
</div>
My JQuery
function dialogs(id) {
$(function () {
var ph = $("#Jobs");
ph.dialog({
width: 700,
modal: true,
show: 'slide',
closeText: 'hide',
draggable: false,
resizable: false
});
//});
});
}
function clik(id) {
dialogs(id);
return false;
}
var options = {
url: "/Post/UploadImages"
};
$('#frmupload').ajaxForm(function (options) {
//alert(data);
alert("Thank you for your comment!");
});