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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:11:11+00:00 2026-06-16T02:11:11+00:00

Here is what I want to / am trying to do. There is a

  • 0

Here is what I want to / am trying to do.

There is a form. The form has a submit button. the onMouseDown() event for the submit button is:

<input type='submit' value='Search' name='save' id='save' onmousedown = 'DimOn("test.php", "SearchResultDiv")' />

Now, once the button is clicked I want it to do three things in EXACT order.

1) Dim the page.

2) Perform the Ajax Query, and Populate the search Results.

3) Remove the Dim.

EDIT:

Even tried using the beforeSend, and Complete events in jQuery object

function DimOn(sUrl, sElement) 
{
    jQueryAjax(sUrl, sElement);
}

function jQueryAjax(sUrl, sElement) 
{
    $.ajax({
        url: sUrl,
        type: 'GET',
        async: false,
        cache: false,
        timeout: 1000,
        beforeSend: function(){
            $('#dim').fadeIn();
        },  
        complete : function(){
            $('#dim').fadeOut();
        },      
        error: function(){
            return true;
        },
        success: function(msg){ 
            if (msg != '')
                PopulateResponse(msg, sElement, false);
            else 
                PopulateResponse("An Error Has Occured.", sElement, false);
        }
    });
}

Currently, it will appear to do it like this:

2) Perform the Ajax Query, and Populate the search Results.

2) Dim the page.

3) Remove the Dim.

Where the result populate (takes ten seconds) and the dimmer flashes on and off very quickly.

Please lend me a hand fellow programmers, I am no stranger to this technology, and why I turned async off, to try to get stuff to happen in order, but still NO DICE.

  • 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-16T02:11:12+00:00Added an answer on June 16, 2026 at 2:11 am

    I resolved this issue with this function:

    function jax(sUrl, sElement, bEval, sType, bAsync) 
    {
        $.ajax({
            url: sUrl,
            type: sType,
            async: true,
            cache: false,
            timeout: 30000,
            error: function()
            {
                return true;
            },
            beforeSend: function(){
                $('div#dim').fadeIn(400);
            },  
            complete : function(){
                $('div#dim').fadeOut(200);
                if(sUrl.search(/scroll=true/ig) != -1)
                    goToByScroll(sElement);
    
            },                      
            success: function(msg){ 
                if (msg != '')
                {
                    PopulateResponse(msg, sElement, bEval);
                }
                else
                {
                    PopulateResponse("An error has occurred.", sElement, bEval)
                    //Coming soon, ajax call to php file to log javascript failure.
                }
            }
        });
    }    
    

    This CSS

    div#dim
    {
        background-color:#000;
        -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
        filter: alpha(opacity=60);
        opacity:.6;
        height:100%;
        width:100%;
        position:fixed;
        top:0;
        left:0;
        z-index:1005;
        display:none;
        cursor:wait;
    }
    
    div#dim div
    {
    
        position:relative;
        top:400px;
        z-index:1006;
        text-align:center;
        cursor:wait;
    }
    
    div#dim div img
    {
        z-index:1007;
        text-align:center;
        border:none;
        cursor:wait;
    }
    

    and This HTML

    <div id='dim'><div style="text-align:center;"><img src="Images/Loading/loading10.gif" alt="Loading... please wait" title="Loading... please wait" /></div></div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm trying to submit a simple form that has one text area that
Here's what I'm trying to do: I want to get a list of all
Related question [stackoverflow] here . I'm trying to do the above, but I want
Need a little help with my jquery here I want all my button with
i m having following type of simple sql server table Here I want to
Here is what I am trying to accomplish. I have a form that uses
I'm trying to create a custom search but getting stuck. What I want is
I'm trying to create a html tabbed form where each named tab has a
Hi there I'm trying to create a simple enough php email form without any
I have a search form built in ASP.NET that has a dropdown list which

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.