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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:44:01+00:00 2026-06-18T04:44:01+00:00

What is the event to do actions while $.post method is in progress jQuery.

  • 0

What is the event to do actions while $.post method is in progress jQuery.

Explained more clearly: I use $.post method in my code in PHP. I need to display loading image until the $.post returns a value!

My code

$("#wit").click(function(){
    var story = $("#story").val();
    $.post('diary/ajax/ajax.php', {newdiary:story},function(data){
        if(data=="SORRY")
        {
            alert("Sorry! Try Again in few seconds");
        }
        else
        {

        }
    });
});
  • 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-18T04:44:03+00:00Added an answer on June 18, 2026 at 4:44 am

    Just display the loading image in the line before you make your post() call. Then hide the loading image in the callback function. Note for this sort of operation you should also have a callback for a failed call so that you can hide the image in case the call fails for some reason.

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

Sidebar

Related Questions

I have: <%= button_to 'Remove', remove_attendee_event_path(:event_id => @event.id, :user_id => user.id), :method => :post
<?php $name=$_POST['name']; ?> <form method=POST action=<?php echo $_SERVER['PHP_SELF']; ?>> <input type=text name=name> <input type=submit
I'm experiencing a strange problem while trying to use the Ajax.BeginForm method of ASP.NET
I used the following code to display the event details fetched from the database.
I need to offer scheduling of actions/events, in our web site. A crap analogy
I am returning File result from action triggered by the form post event. I
How can I rewrite this code to coffeescript: $('.delete_action').click(function(event) { $.get('/delete_action?name=' + event.target.name +
I'm trying to implement Ajax jQuery Form submission. The code I pasted below is
-#encoding: utf-8 :css .hidden{display:none;} %script{:src=>/javascripts/jquery.js} %form{:action=>https://get724.ccvb.com.tr/Get724/get724uye.aspx,:method=>post} %input.hidden{:type=>text,:name=>uyeno,:value=>} %input.hidden{:type=>text,:name=>kkno,:value=>} %input.hidden{:type=>text,:name=>gectar,:value=>} %input.hidden{:type=>text,:name=>tutar,:value=>} %input.hidden{:type=>text,:name=>dcins,:value=>} %input.hidden{:type=>text,:name=>sipbil,:value=>} %input.hidden{:type=>text,:name=>sesbil,:value=>} %input.hidden{:type=>text,:name=>burl,:value=>}
On my website I use JavaScript/AJAX to do the search and show results while

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.