Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1079865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:56:16+00:00 2026-05-16T21:56:16+00:00

i am using jquery ui dialog and displaying a form: $(#detailView).dialog({ resizable: false, height:

  • 0

i am using jquery ui dialog and displaying a form:

$("#detailView").dialog({
    resizable: false,
    height: 'auto',
    autoOpen: false,
    width: 1000,
    modal: true,
    buttons: {
        'Close': function () {
            closeModalPopup();
        }
    }
});

i have a button inside my form (not the dialog buttons). When i click this button, i send ajax to the server using this code below:

 $('.button').live('click', function () {

    $.post('/MyController/Update', $("#myForm").serialize(), function (data) {

        if (data == "Update Complete") {
            closeModalPopup();
        }
        else {
            $("#detailView").html(data);
        }
    }, "html");
});

if the post is successful, i return “Update Complete” which just goes and closes the jquery ui dialog.

the issue is that when it fails and i have an error i do this in my controller action:

        if (!validationResult.IsValid)
        {
            validationResult.AddToModelState(ModelState, null);
            return PartialView("DetailContent", hireRequest);
        }
        else
        {
            return Content("Update Complete");
        }

this should hit the “else” case in the javascript callback and show the new content in the dialog but what seems to be happening is that the content of the partialresult shows up on the full underlying page (as opposed to the modal dialog where i want it)

any suggestions on whats going wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:56:17+00:00Added an answer on May 16, 2026 at 9:56 pm

    You should probably create another container (a DIV for example), to be the target of your AJAX call, within your #detailView container so that the modal dialog created by JQuery won’t be overwritten.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the jQuery UI dialog with modal=true . In Chrome and Safari, this
I am using a jQuery dialog with autoOpen set to false. The first time
Using a jquery dialog with modal: true by design disables interaction with other elements
I am displaying a modal dialog using jQuery. This dialog has a textarea control
I am using Jquery Dialog box for a cv registration form on my website
I am using the jQuery dialog widget with the modal option over a wordpress
I'm loading form into jquery-ui dialog using jquery.html() function and then Submitting doesn't work
I'm using jQuery UI's Dialog option to render a pop-up signup form, which contains
I am trying to open a modal jquery dialog using jquery 1.4 and jquery-ui-1.8rc3.custom.js
Using jquery dialog I have created a popup box with a form. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.