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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:12:47+00:00 2026-05-23T19:12:47+00:00

I have an asp.net form. I want to show a jquery progress image while

  • 0

I have an asp.net form. I want to show a jquery progress image while a form is submitted and there is some stuff happening in the backend.

This is my javascript:

<script language="javascript">
$(document).ready(function () {
    $('#progress').hide();
    $("#ProjectNavigation input.bgdiv").click(function () {            
        $("#progress").show();
        $("body").load($(this).attr('href'));
        return false;
    });
});

Clicking on the either images with class set to “bgdiv” is showing the animated gif (as expected), but I want to hide the gif (or div it is wrapped around with) after backend stuff has completed processing. Not sure how to accomplish that. I am not sure if this line is correct in my javacsript since I dont have an href tag in my html: $(“body”).load($(this).attr(‘href’));

Any tips are very much appreciated.

Here is my markup:

<table id="ProjectNavigation" class="ProjectNavigation" width="100%">
<tr>
    <td>Title 1</td><td>Title 2</td><td>Title 3</td><td>Title 4</td>
</tr>
<tr>
    <td class="HelpGuidanceLink">Comments
        <div id="progress" style="padding:20px 0 0 35px;">
            <img src="/_layouts/images/progress-image.gif">
        </div>
    </td>
    <td colspan="3">
        <textarea name="CommentsTextBox" rows="3" cols="20" id="CommentsTextBox" class="ProjectGuideTextBox">
            other comments testing...
        </textarea>
    </td>
</tr>    
<tr>        
    <td colspan="4">
        <input type="image" name="PreviousPhaseImageButton" id="PreviousPhaseImageButton" class="bgdiv" src="/images/previous-phase-arrow.png" />
        <input type="image" name="NextPhaseImageButton" id="NextPhaseImageButton" class="bgdiv" src="/images/next-phase-arrow.png" />            
    </td>    
</tr>

Thanks –

  • 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-23T19:12:49+00:00Added an answer on May 23, 2026 at 7:12 pm

    .load() accepts a callback function as a parameter. Add a function as your second parameter in your call to load that hides the progress bar.

    Regarding the href, it looks like you’re right – it won’t work as is. You need to tell jQuery the URL to load. It seems most natural to me to specify that in the input’s value attribute and retrieve it using .val().

    $("body").load($(this).val(), function (responseText, textStatus, XMLHttpRequest) {
        $('#progress').hide();
    });
    

    Here’s a working demo at jsfiddle.

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

Sidebar

Related Questions

No related questions found

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.