Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="modalBackground"></div>
- <div id="modalDialog">
- <p id="modalTitle"></p>
- <div id="modalMessage"></div>
- <div id="modalDetail"></div>
- <div id="modalControls">
- <a id="lnkMoreDetail">More Detail</a><button id="btnOK">Okay</button>
- </div>
- </div>
- <script>
- $("#btnSubmit").on("click", function () {
- var $form = $("form#frmCreateUser");
- $form.submit();
- });
- $("form#frmCreateUser").submit(function () {
- $.post($(this).attr("action"), $(this).serialize(), function (data) {
- if (!data.IsOK) {
- $("#modalTitle").html(data.Title);
- $("#modalMessage").html(data.Message);
- $("#modalDetail").html(data.Error);
- $("#modalBackground").Show();
- $("#modalDialog").Show();
- }
- else
- {
- window.location.href = '@Url.Content("~/Users")';
- }
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement