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

  • Home
  • SEARCH
  • 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 170335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:47:23+00:00 2026-05-11T12:47:23+00:00

is there any event to be handled between the dom:loaded and load using Prototype

  • 0

is there any event to be handled between the dom:loaded and load using Prototype javascript framework?
I’ve implemented a preloader using prototype which is looking like this:

Event.observe(window,'load',preload); function preload(){     if($('wrapper'))         $('wrapper').setStyle({'display':'block'});     if($('loading'))         setTimeout('$('loading').fade({duration: 5.0});',4000); } 

then I’ve an another handler using for column height fixatioan which is:

Event.observe(window,'load',function(){      var bottomExtraOffset = (Prototype.Browser.IE) ? 100 : 130;     if(parseInt($$('.col1')[0].getStyle('height')) > parseInt($$('.col2')[0].getStyle('height')))         $('wrapper').setStyle({'height' : parseInt($$('.col1')[0].getStyle('height'))+bottomExtraOffset+'px'});      else         $('wrapper').setStyle({'height' : parseInt($$('.col2')[0].getStyle('height'))+bottomExtraOffset+'px'}); });//observe     

It’s working pretty nice in any browser but IE! It seems that IE is not appending the second handler to the onload handlers list, so when the first one is trying to get height of any of columns it returns 0 coz it’s still displayed as none.

is there any other event than load & dom:loaded to be handled and get me outta this!?

  • 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. 2026-05-11T12:47:24+00:00Added an answer on May 11, 2026 at 12:47 pm

    There’s no such event AFAIK, and even the dom:loaded event is implemented by Prototype developers and that’s not a default event in JS. You might want to use a helper to make a delay in performing of the second handler, so the first one will be performed first:

    function foo(){      var bottomExtraOffset = (Prototype.Browser.IE) ? 100 : 130;     if (parseInt($$('.col1')[0].getStyle('height')) > parseInt($$('.col2')[0].getStyle('height'))) {         $('wrapper').setStyle({'height' : parseInt($$('.col1')[0].getStyle('height')) + bottomExtraOffset + 'px'});      }     else {         $('wrapper').setStyle({'height' : parseInt($$('.col2')[0].getStyle('height')) + bottomExtraOffset + 'px'});     } }  function bar() {   // One msec delay.   setTimeout(foo, 1); }  Event.observe(window, 'load', bar); // or window.observe('load',bar); 

    Also, you can check if the user agent is some hell like IE, then use this method and your said one otherwise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 116k
  • Answers 116k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Or if you're on .NET 3.5, you can use XElement.Load().… May 11, 2026 at 10:36 pm
  • Editorial Team
    Editorial Team added an answer Many thanks to all who gave helpful answers. Here are… May 11, 2026 at 10:36 pm
  • Editorial Team
    Editorial Team added an answer I agree with R. Pate and Todd Gardner; a std::set… May 11, 2026 at 10:36 pm

Related Questions

When aborting the execution of a thread I'm always doubting between a graceful exit
I have a text box where I want to limit the number of selected
I have some event handler on a boundary class that manages a persistence mechanism
I frequently hear/read the following advice: Always make a copy of an event before

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.