Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery ui modal dialog - submit button how to submit and return back to the modal MVC3
    primarykey
    data
    text
    <p>I have a quick edit jquery dialog that allows my users to change some customer details. The form is great, but after the form submit I cant work out how to get the modal dialog to close and return back to the view still in the background.</p> <p>my http post on quickedit performs all of the database updates etc, but currently only returns a partial view of the quickedit form. I need it to either close the modal and return back to the page that called the dialog (without reloading it...) or just drop back to the modal dialog if that isn't possible. </p> <p>here is my http post code:</p> <pre><code> [HttpPost, ActionName("QuickEdit")] public ActionResult QuickEdit(newUser usrdet) { db.Entry(usrdet).State = EntityState.Modified; db.SaveChanges(); return PartialView(usrdet); } </code></pre> <p>The code as it is returns back the updated object, but not in a jquery UI modal..</p> <p>Any help greatly appreciated.</p> <p>Javascript to invoke the ui:</p> <pre><code>&lt;script type="text/javascript"&gt; $.ajaxSetup({ cache: false }); $(document).ready(function () { $(".openDialog").live("click", function (e) { e.preventDefault(); $("&lt;div&gt;&lt;/div&gt;") .addClass("dialog") .attr("id", $(this).attr("dialog-id")) .appendTo("body") .dialog({ title: $(this).attr("dialog-title"), close: function () { $(this).remove() }, modal: true, width: 706, height: 600 }) .load(this.href); }); $(".close").live("click", function (e) { e.preventDefault(); $(this).closest(".dialog").dialog("close"); }); }); </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload