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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:18:45+00:00 2026-06-16T22:18:45+00:00

Clarification: I’m not interested in using jQuery methods. Summary I use a method to

  • 0

Clarification:

I’m not interested in using jQuery methods.

Summary

I use a method to only run my modules after the html has finished loading. It looks like this. page_complete is the id of the last element on the page.

$A.finish('page_complete', function () { 
    // page has finished loading
});

Finish is implemented like this. It is just a timer that checks of the existence of the last element. Once it finds it, it initializes all the modules.

I don’t understand why the element is NULL as FF is telling me.

/*finish
** Once an element has been loaded an HTML focus event is fired
** on that ID.  It can not be cancelled and bubbles up
**
*/
$A.finish = function (id, callback) {
    var htm_finished = document.getElementById(id);
    if (htm_finished) {
        $A.initAll(); // intilAll will fire the init function of all modules.
        $A.makeEvent('focus', htm_finished);
        callback();
    } else {
        setTimeout(function () {
            $A.finish(id, callback);
        }, 10);
    }
};

Error in Firefox

...TypeError: this.E.ready is null @ ...

Note I put a comment where the error is.

Module with error

/*MUserAny
**
**
**   
*/
$A.module({
    Name: 'MUserAny',
    S: {
        DynSma: SDynSma,
        DynTwe: SDynTwe,
        DynArc: SDynArc,
        AniFlipMediaPane: SAniFlipMediaPane,
        AniFlipPage: SAniFlipPage,
        ClientStorage: SClientStorage
    },
    E: {
        ready: $A('#page_complete')[0]
    },
    init: function () {
        var pipe = {},
            this_hold = this;
        this.E.ready.addEventListener("focus", function (event) { // error is here.
            pipe = $A.definePipe(this_hold.Name);
            $A.machine(pipe);
        }, false);
    },
    pre: function (pipe) {
        var h_token = this.S.ClientStorage.get('h_token');
        if ((h_token === '0') || (h_token === 'undefined') || (h_token === null)
                || (h_token === undefined)) {
            this.S.AniFlipPage.run('sp');
            pipe.state = false;
        } else {
            pipe.server.smalls.h_token = h_token;
            pipe.state = true;
        }
        this.S.AniFlipMediaPane.run('mi_cover');
        return pipe;
    },
    post: function (pipe) {
        this.S.DynSma.run(pipe.server.smalls);
        this.S.DynArc.run(pipe.server.arcmarks);
        this.S.DynTwe.run(pipe.server.tweets);
        this.S.AniFlipPage.run(this.S.ClientStorage.get('page'));
        return pipe;
    },
    finish: function (pipe) {
    }
});
  • 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-16T22:18:47+00:00Added an answer on June 16, 2026 at 10:18 pm

    It looks like

    E: {
        ready: $A('#page_complete')[0]
    }
    

    is being evaluated as part of the object literal, and if this is occuring before the page is complete you get your error.
    One quick and dirty solution may be to change E.ready to a function, which will only be called during init, which you know happens after page complete, something like

    E: {
        ready: function() { return $A('#page_complete')[0]; }
    },
    init: function () {
        var pipe = {},
            this_hold = this;
        this.E.ready().addEventListener("focus", function (event) { ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Clarification: I somehow left out the key aspect: not using os.system or subprocess -
Clarification/summary for the question -- we're looking for: a hosted bug tracking system, that
For clarification, are you able to use MySQL this way to sort? ORDER BY
I'm seeking further clarification after seeing What is responsible for releasing NSWindowController objects? I'm
Clarification: My previous Android development environment has been a Win7 machine using command-line build
Seeking clarification/confirmation: if I understand correctly, the following considerations about orphaned users apply only
I require clarification on String[] comparison inside Object's equal method. Below is my code
I could use some clarification on destructors. I understand that if an object contains
Clarification: I'm only targeting modern browsers that support createEvent, addEventListener, etc.... Question I mean
I need some clarification. Are these two methods the same or different? I get

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.