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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:17:27+00:00 2026-05-11T00:17:27+00:00

I am looking at an asp.net 2 web application that I am maintaining (but

  • 0

I am looking at an asp.net 2 web application that I am maintaining (but did not write).

Some things that should happen on the page loading do not, but only sometimes, and it seems to be if you are using Firefox 3 inside a VM. JQuery and asp.net Ajax are used.

The important function that should run every time (but does not) is attached by the following Javascript:

<script type='text/javascript'> //<![CDATA[ $(document).ready(function(){ Sys.Application.add_load(ImportantFunction); });    $(document).ready(function(){ Otherstuff(); }); $(document).ready(function(){ MoreStuff(); }); //]]> </script> 

But if I use firebug to set a breakpoint inside ImportantFunction(), it is not hit on page load in firefox 3, but it is hit on an ajax update.

In the page there are multiple calls to $(document).ready since they come from different parts of the asp.net code behind it. Yes, they do all execute.

  • 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-11T00:17:28+00:00Added an answer on May 11, 2026 at 12:17 am

    Try this:

    <script type='text/javascript'> //<![CDATA[ $(document).ready(ImportantFunction);    $(document).ready(Otherstuff); $(document).ready(MoreStuff); //]]> </script> 

    Put the call to Sys.Application.add_load in the body of ImportantFunction, i.e in your .js file:

    function importantFunction() {    Sys.Application.add_load(ImportantFunction); } 

    Edit: I’m not sure if its possible to add multiple functions to be run on $(document).ready event. It might help if you did this instead:

    <script type='text/javascript'>     //<![CDATA[     $(document).ready(init);        //]]>     </script> 

    And in init you can include calls to all the other functions, i.e:

    function init() {    importantFunction();    otherStuff();    moreStuff();    //Any other functions to be called upon page load go here } 

    It will also make the code easier to read 🙂

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

Sidebar

Ask A Question

Stats

  • Questions 75k
  • Answers 75k
  • 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
  • added an answer DELETE @MrTemp FROM @MrTemp mt LEFT JOIN ... May 11, 2026 at 2:52 pm
  • added an answer Raymond Chen (who may even kick Jon Skeet's ass when… May 11, 2026 at 2:52 pm
  • added an answer Importing in Java is only necessary so the compiler knows… May 11, 2026 at 2:52 pm

Related Questions

I have an application consisting of an ASP.NET web application, a couple of Windows
I am looking for an open-source asp.net (preferably .net 2.0) project in c#. It
Our company has an intranet with 30,000+ web pages and 160+ web applications. This
This is an ASP.Net 2.0 web app. The Item template looks like this, for

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.