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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:03:41+00:00 2026-05-24T17:03:41+00:00

My need is very simple. When a user try to log in and submit

  • 0

My need is very simple. When a user try to log in and submit the login form, i would to display an ajax loader icon (like ones generated at http://www.ajaxload.info) in foreground with the background transparent and unclickable (like in this site). when the server has finished, it can display the next page or redisplay the old one with the errors.

How can i do that?

Thank you very much in advance.

  • 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-24T17:03:42+00:00Added an answer on May 24, 2026 at 5:03 pm

    Using jQuery (which is a great javascript library and has hundreds of uses besides this one)
    you can detect the submit event on the form and take some action, like this:

    $(function(){  
     $('#yourFormId').on('submit', function(e){
            //stop the form refreshing the page
            e.preventDefault();
    
            //serialize the form for submission to the server
            var data = $(this).serialize();
            //get the url for the form
            var url = $(this).attr('action');
    
            //make an ajax request to submit the form, showing the loader and unclickable div
            $('#yourAjaxLoader,#unclickableDiv').fadeIn();
            $.post(url, data, function(response){
                //the request has completed, so fade out the loader and div
                $('#yourAjaxLoader,#unclickableDiv').fadeOut();
            });  
        }); 
    });
    

    To acheive the unclickable div, try some css like this:

    /*css*/    
    #unclickableDiv
    {
        z-index:99999;
        width: 100%;
        height: 100%;
        opacity: 0.5;
        background-color: black;
        display:none;
    }
    

    and put the div just inside the body tag. when it is faded in, it will be ‘above’ the rest of the page, making it unclickable. just put your ajax loading icon inside this div so it will show up, too.

    You can get jQuery from http://jquery.com and I highly recommend using it anyway, even if not for this. Hope this helps

    Update:

    The new jQuery on() method has effectively replaced .submit and .click etc since version 1.7, so I’ve updated this example to reflect that. More info here: http://api.jquery.com/on/

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

Sidebar

Related Questions

I have this very simple login form with user and pass and I need
I need to do a few very simple URL manipulations in Java. Like get
I have a very simple form, consisting of a textarea and a submit button.
I need a very simple and clear example of how to create an OCX
I need a very simple menu which probably contains only one or two items:
I need to complete a very simple application. We want to archive some Sharepoint
I need to be able to merge two (very simple) JavaScript objects at runtime.
i have very simple problem. I need to create model, that represent element of
I need to use or stimulate a very simple session object inside my WCF
i developed a very simple vb.net application and i need a way for every

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.