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 9004577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:55:39+00:00 2026-06-16T00:55:39+00:00

The Objective: Change my $.post to an $.ajax in order to syncronize it and

  • 0

The Objective:

Change my $.post to an $.ajax in order to syncronize it and display the message until request has finished.

I would like to know exactly how I could do that with an ajax request, my big problem is when I try to replace div content as what I have done it here using $.post

The code:

The view

 function NewVersion() {
     $.ajax({
         url: "/Valoration/NewVersion",
         type: "POST",
         async: false,
         success: function (data, status, xhr) {
             if (data.success) {

                 $.post(data.hvmHeaderPartialView, function (partial) { $('#divHvmHeader').html(partial); });

                 MessageNewVersionSucced();
             }
         },
         error: function (xhr, status, err) {
             alert(err);
         }
     }); 

The controller

public ActionResult HvmHeaderPartialView()
    {
        return PartialView("_HvmHeaderPartialView,", DetailHvmModel);
    }    


private ActionResult NewVersion()
    {

    var result = hvmService.addNewVersion(hvm);
        var HvmHeaderPartialView = Url.Action("HvmHeaderPartialView,");


        return Json(new
        {
            success = result,
            hvmHeaderPartialView= HvmHeaderPartialView,

        });
    }
  • 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-06-16T00:55:40+00:00Added an answer on June 16, 2026 at 12:55 am

    Do you need to keep it async=false?

    You could use $.load() to replace div content instead of using $.post. For example:

    $('#divHvmHeader').load('ajax/test.html');
    

    With a callback function:

    $('#divHvmHeader').load('/Valoration/NewVersion', function() {
      MessageNewVersionSucced();
    });
    

    Note: MessageNewVersionSucced will execute only after the ajax call to ‘/Valoration/NewVersion’ completed.

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

Sidebar

Related Questions

I need to change the resolution of the existing image in objective-c just like
I would like to do the following: As a user, post a photo (
Does anybody know how to change the brightness of a UIImageView in objective-C? Also,
Objective was: To change pages like details.aspx?GUID=903901823908129038 to clean ones like /adrian_seo Achieved: Now
Objective Change these filenames: F00001-0708-RG-biasliuyda F00001-0708-CS-akgdlaul F00001-0708-VF-hioulgigl to these filenames: F0001-0708-RG-biasliuyda F0001-0708-CS-akgdlaul F0001-0708-VF-hioulgigl Shell
Objective C is new for me. How can I change the font of a
Objective-C uses a sophisticated message-passing system when one object calls a method on another
Are there any equivalents in objective-c to the following python urllib2 functions? Request, urlopen,
My objective is to change the delimiter of scanf to \n . I tried
Iam new to objective c,need to change the text color of selected segment in

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.