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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:41:07+00:00 2026-05-15T04:41:07+00:00

There is a web page with place holder (a normal div). Via ajax calls

  • 0

There is a web page with place holder (a normal div). Via ajax calls I am loading a <form> and a <script> into the place holder. The script contains necessary javascript to initialize the form (i.e. for e.g. disable the controls so as to make form read-only, etc). Here is a piece of code I have; it works, but the commented part doesn’t work. Because the script engine cannot find the object tristate_DisableControl which is a function in one of those scripts I call via ajax.

$(document).ready(function() {

    //    $('#site_preferences_content div').each(function() {
    //        if (typeof (window.tristate_DisableControl) == 'undefined') {

    //            if (typeof (window.console) != 'undefnied')
    //                console.log((new Date()).toTimeString() + ' not logable');

    //            pausecomp(1000);

    //        }
    //        else
    //            tristate_DisableControl(this);
    //    }); //end $('#site_prefrences_content div').each()

    setTimeout(function() {
        $('#site_preferences_content div').each(function() { tristate_DisableControl(this); })
    }, 1000);

});  

I thought by the time $(document).ready() executes the DOM will be properly loaded…

  • 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-15T04:41:08+00:00Added an answer on May 15, 2026 at 4:41 am

    The ready event happens when the page is finished loading. It doesn’t wait for asynchronous AJAX calls to complete.

    To run the code once the extra content is loaded, you use the callback of the load method. Example:

    $('#site_preferences_content').load('content.html', function() {
      $('#site_preferences_content div').each(function() {
        tristate_DisableControl(this);
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading a specific web page in a WebBrowser control. Is there a
Is there a sexy way to get a web page with Google Maps (in
In my web page header, there are several buttons. What I want is to
I have dynamic web page with JS. There is a <textarea> and a Send
Is there a way to run a Java command line in a web page
Is there a way to determine programmatically, using Python, which web page is currently
Is there a way to determine programmatically, using Python, which web page is currently
On my web site, there is an index page, but if I take out
In web.py, I use web.seeother() to redirect to another page, is there a way
A 3rd party web application has a cross-scripting security issue. There is one 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.