Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dialog.dialog("option", "buttons", {
- "Save": function () {
- var dlg = $(this);
- $.ajax({
- url: $url,
- type: 'POST',
- data: $("#" + formName).serialize(),
- success: function (response, textStatus, xhr) {
- $(target).html(response);
- dlg.dialog('close');
- dlg.empty();
- }
- },
- error: function (xhr, status, error) {
- ....
- }
- });
- },
- "Cancel": function () {
- $(this).dialog("close");
- $(this).empty();
- }
- });
- @using (Html.BeginForm("Edit", "Patient", null, FormMethod.Post, new { id = "form", enctype = "multipart/form-data" }))
- $dialog.dialog("option", "buttons", {
- "Save": function () {
- var dlg = $(this);
- var formData = new FormData($("#" + formName)[0]);
- $.ajax({
- url: $url,
- type: 'POST',
- data: formData,
- processData: false,
- contentType: false,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement