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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:22:56+00:00 2026-06-05T02:22:56+00:00

We are using the jQuery form plugin on our site. We need to be

  • 0

We are using the jQuery form plugin on our site. We need to be able to show a loading gif when a submit occurs on all forms. So far I have been able to get this done like the following

    $("#uploadAssetImageForm").ajaxForm({
        dataType: 'json',
        beforeSubmit: function () {Cvrs.SetLoading(true, '#uploadAssetImageForm')},
        success: function(asset) {
            Cvrs.SetLoading(false, '#uploadAssetImageForm');
        $("#uploadAssetImageDiv").dialog("close");
            $(":input", "#uploadAssetImageDiv").not(':button, :submit, :reset').val('').removeAttr('checked').removeAttr('selected');
            ReplaceAsset(asset);

        }
    });

In particular the parts I’m talking about are the beforeSubmit function and the call again to set it to false on success.

Set loading just shows a loading gif and disabled form buttons

function(isLoading, form) {

isLoading ? $(form + ' input[type="submit"]').attr("disabled", true) :
    $(form + ' input[type="submit"]').removeAttr("disabled");


isLoading ? $(form + ' .loading-animation').show() :
    $(form + ' .loading-animation').hide();

Is there any way I can get any call to ajaxform to run that code on the beforeSubmit and success along with any other code that might be there as well (running the loading stuff first though) or do I have to go through each case and add this in?

I understand I’ll have to put the loading reference in each form but this makes sense as its possible that different forms could need the loading gif in different spots

  • 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-05T02:22:57+00:00Added an answer on June 5, 2026 at 2:22 am

    You may consider using the ajaxSend event. It fires before an AJAX send event is fired:

    $(document).bind('ajaxSend', function(e, request, options) {
        Cvrs.SetLoading(true, '#uploadAssetImageForm');
    });
    

    I hope it helps!

    • 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 form plugin to submit forms to my MVC application. The
i am using jquery form plugin for file upload . i am not able
I'm using the jQuery Form plugin to do an 'ajax' submit of my form,
I'm using the jquery form plugin (http://jquery.malsup.com/form/) to show the results of a submitted
I'm using jQuery's form plugin to submit a form asynchronously. The server sends back
Im using the jQuery dynamic form plugin , but i need support for nested
i using this JQuery Form Validation Plugin. https://github.com/posabsolute/jQuery-Validation-Engine I am able to attach it
I need to create a custom jquery form validation using Jquery Validation Plugin where
I am using jQuery Form Plugin to submit (POST) a WebForm. Everything works great
I have been using the jquery form plugin to submi forms on my page

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.