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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:06:56+00:00 2026-05-28T08:06:56+00:00

I have this ajax function: function callpage() { $(‘#formcontent’).empty().html(‘<p class=vent>Pleace wait</p>’); var form =

  • 0

I have this ajax function:

function callpage() {
    $('#formcontent').empty().html('<p class="vent">Pleace wait</p>');
    var form = $('form#sog');
    $.ajax({
        type: form.attr('method'),
        url: form.attr('action'),
        data: form.serialize(),
        success: function(msg) {
            $('#formcontent').css("border", "none").html(msg);
        }
    });
}

When it is called I want to shadow everthing else, then the formcontent div and all other jquery functions should be disabled until the ajax call has succeeded.

Update:
My toggle function that should be disabled when callpage is called until it is succeeded:

$('#search').hover(
    function () {
        $('#search').animate({width: '400px'}, 500, function() {});
    },
    function () {
        $('#search').animate({width: '200px'}, 500);
        callpage();
    }
);
  • 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-28T08:06:57+00:00Added an answer on May 28, 2026 at 8:06 am

    You could call an overlay when the AJAX call start with AJAXStart and then hide it with ajaxComplete

    $(document).ajaxStart(function(){
       $("#overlay").show();
     });
    
    $(document).ajaxComplete(function(){
       $("#overlay").hide();
     });
    

    Or you can put everything in the call:

        $.ajax({
                type: form.attr('method'),
                beforeSend: function(){$("#overlay").show();},
                complete: function(){$("#overlay").hide();},
                url: form.attr('action'),
                data: form.serialize(),
                success:function(msg){$('#formcontent').css("border", "none").html(msg);}
                });
    

    EDIT i take the overlay from the other answer

    #modal-overlay {
        position: fixed;
        z-index: 10;
        background: black;
        display: block;
        opacity: .75;
        filter: alpha(opacity=75);
        width: 100%;
        height: 100%;
    }
    

    For your function you could add some extra logic and check if the overlay is visible or not

     $('#search').hover( 
      function () {
            var overlayDisplayed = $("#overlay").is(":visible");
            if(!overlayDisplayed){
              $('#search').animate({width: '400px'}, 500, function() { });
             }
      },
      function () {
            var overlayDisplayed = $("#overlay").is(":visible");
            if(!overlayDisplayed){
              $('#search').animate({width: '200px'}, 500);
              callpage();
             }
      }
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this class with this ajax call: Person = function () { this.__type
Hi I have this script: function ajax(){ if (navigator.standalone) return; for (var i= document.links.length;
I have this ajax call to a doop.php . function doop(){ var old =
I have this ajax call: $('.ajaxtrigger2').click(function(){ $('#target').load('xxx.html'); ... how to append a Loading msg
I have an ajax function in home.php that give me back this html response
I have this ajax function $.ajax({ url: requestUrl, type: 'get', dataType: 'html', beforeSend: function()
I have written this ajax request for username checking... function check_username() { var username
I have this ajax event function save_response_with_ajax(t){ var form = $('#edit_'+t); var div =
I am using the jQuery $.ajax() function. I have put this into a parent
I have this code for doing an ajax request to a webservice: var MyCode

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.