I am using this version of the jQuery form plugin https://raw.github.com/malsup/form/master/jquery.form.js getting the error message:
an error in the form.submit();
SCRIPT87: Invalid argument. jquery.form.js, line 347 character 5
My code is:
<form id="ajaxUploadForm" action="@Url.Action("Upload", "Home")%>" method="post" enctype="multipart/form-data" > <fieldset> <legend>Upload a file</legend> <label>File to Upload: <input type="file" name="file" /></label> <input id="ajaxUploadButton" type="submit" value="Upload" /> </fieldset> </form> $(function () { $("#ajaxUploadForm").ajaxForm({ iframe: true, dataType: "json", beforeSubmit: function () { // $("#ajaxUploadForm").block({ message: '<img src="/Content/themes/start/images/progress.gif" />' }); }, success: function (result) { // $("#ajaxUploadForm").unblock(); //$("#ajaxUploadForm").resetForm(); $.growlUI(null, result.message); }, error: function (xhr, textStatus, errorThrown) { //$("#ajaxUploadForm").unblock(); //$("#ajaxUploadForm").resetForm(); $.growlUI(null, 'Error uploading file'); } }); });
I am doing this loading in the side simple model dialog box.
Maybe someone has ideas on how to fix this?
source share