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

The Archive Base Latest Questions

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

I have the function put here like below: $(document).ready(function () { UserControlNameInit(); }); The

  • 0

I have the function put here like below:

$(document).ready(function () {
     UserControlNameInit();
});

The script are put in the following and the block is in the .ascx page.

<script type="text/javascript">
</script>

However, the function UserControlNameInit() does not run when the page loads. It is showing in the page source. I can still call this function through FireBug console by manually typing the name of the function.

I did the same way with other user controls, and it works. Just 1-3 user controls are not working…

Any possible reason for this? Thanks!

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

    I think I found the problem. Thanks to IE 9 Beta’s developer tool, which actually allow me to debug it and I saw script exception when the page loads and the problem is because of the newly added user control render html in correctly and block the functions call in the old user control. After I comment out the other user controls in the pages, the problem is gone. Now I need to figure out which control actually cause the problem.

    Update: I think I found the right answer for this problem: I have initialization code written as below:

    $(document).ready()
    {
         UserControlNameInit();
    }
    

    Which blocks the call in the other user control which is written as this:

    $(document).ready(function(){ 
        UserControlNameInit(); 
    });
    

    Although I don’t know the difference between these too. But the later code seems to cause no problem to other user controls.

    Thank you for all the attention and help.

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

Sidebar

Related Questions

I have put together an image scroller using jquery, like this function rotateImages(whichHolder, start)
I have a array which contains values like this See below for script sample
I have an jquery ajax success function which uses a template to put json
I have two asp.net textboxes and need to put a validate function in javascript
I am using the jQuery $.ajax() function. I have put this into a parent
I have function like this: function ypg_delete_img($id, $img) { $q = $this->ypg_get_one($id); $imgs =
I have function Start() that is fired on ready. When I click on .ExampleClick
I have a one-line script passed into the foreach function in a Makefile, as
Consider I have a table, like below, that I am trying to populate with
like the title says, I have a single bug in a script for a

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.