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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:50:18+00:00 2026-06-07T22:50:18+00:00

http://kiwilocals.com.au/dev/ Hello, here is the ajax requests on a category in the middle of

  • 0

http://kiwilocals.com.au/dev/

Hello, here is the ajax requests on a category in the middle of the page under the banner. Work everywhere, in addition to all versions of IE.
I checked the developer’s tools, a query gives the correct structure, but nothing on the loading icon does not appear after loading. In what may be the reason? Thank you.

function scat(th) {
wait_loading('sub_lst');

if (request = create_request()) {

    request.open("GET", "get_subcat.php?id=" + th + "&site=1", true);
    request.onreadystatechange = function () {
        //alert(request);
        if (this.status == 200) {
            if (this.readyState == 4) {

                var doc3 = document.getElementById('sub_lst');
                //alert(doc3);
                doc3.innerHTML = this.responseText;
                if (!scroll_start) {
                    $('.sub_scroll').jScrollPane({
                        animateScroll: true
                    });
                    $('.hidden_control').show();
                    scroll_start = true;
                }
            }
        }
    }
    request.send(null);
}
}

function create_request() {
var request = false;
try {
    request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
    try {
        request = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e2) {
        try {
            request = new XMLHttpRequest();
        } catch (e3) {
            request = false;
        }
    }
}
if (!request) {
    alert("Невозможно выполнить Ajax запрос.");
    return false;
} else return request;
}

function wait_loading(el_id) {
document.getElementById(el_id).innerHTML = "<center><img style=\"padding-top: 60px;\" width=\"64\" height=\"64\" src=\"images/loading.gif\"></center>";

}

  • 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-07T22:50:19+00:00Added an answer on June 7, 2026 at 10:50 pm

    The problem is with your use of ‘this’ in the readstatechange event.

    Give this a shot.

    if(request = create_request()) {
    
        request.open("GET", "get_subcat.php?id="+th+"&site=1", true);
        request.onreadystatechange = function() {
    
            if(request.status == 200) {
                if( request.readyState == 4 ) {
                    var doc3 = document.getElementById('sub_lst');
                    doc3.innerHTML=request.responseText;
    
                    if(!scroll_start) {
                        $('.sub_scroll').jScrollPane({animateScroll: true});
                        $('.hidden_control').show();
                        scroll_start=true;
                    } 
                }
            }
        }
        request.send(null);
    }
    

    But one question… you use jQuery throughout your code, except for this. Why not use:

    $('#sub_lst').load("get_subcat.php?id="+th+"&site=1", function(){
        if(!scroll_start) {
            $('.sub_scroll').jScrollPane({animateScroll: true});
            $('.hidden_control').show();
            scroll_start=true;
        } 
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://jsbin.com/uxepap/3/edit Here is div with links inside. I'm trying to replace comma inside last
http://docs.djangoproject.com/en/dev/howto/static-files/ This suggests that I can use STATIC_URL in my template to get the
http://docs.jquery.com/Plugins/autocomplete can autocomplete check words in the middle of the string. If i wite
http://jqueryui.com/demos/accordion/ You can do $('#itename').accordion('activate', 0) to make an accordion closed but that'll change
http://www.example.com?a=1&a=2 has a valid form-urlencoded querystring and has two values ( 1 and 2
http://logging.apache.org/log4net/release/config-examples.html Given the log table here: CREATE TABLE [dbo].[Log] ( [Id] [int] IDENTITY (1,
http://ano-mag.com/black-foil/ please check this url - click the Order Now button on the left
http://developer.android.com/guide/topics/manifest/service-element.html#proc What are the differences? If the name assigned to this attribute begins with
http://jsbin.com/eyeqer/2/edit var x = document.evaluate('//p/following-sibling::text()', document, null, XPathResult.ANY_TYPE, null); var theTitle = x.iterateNext(); while
http://www.sitepoint.com/build-to-do-list-30-minutes/ So I was doing this (http://www.sitepoint.com/build-to-do-list-30-minutes/) tutorial and everyting went OK. but now

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.