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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:17:03+00:00 2026-05-18T02:17:03+00:00

I am working on a .net website with only a single Javascript (so far).

  • 0

I am working on a .net website with only a single Javascript (so far). Because I have been told Single JS get best performance etc. firstly, any suggestions on JS frameworks , any cutting-edged articles?

Secondly, I met some problems when I was trying to invoke JS function just for a child page. I tried something like :

1.I want to exe a function after a page_load (i.e. ispostback)

$("#div_ID").ready

2.exe a function after page postback (a dropdownlist post back in updatepanel)

pgRegMgr.add_beginRequest(BeginHandler)

function BeginHandler()
{$(".DDL_ClassName").change(function{.....});
}

Both not work. System won’t recognized the div or DDL.
I’m not able to set the function in $(document).ready or .add_beginReqest() in the ‘master’ JS, it will cause errors on other pages. Any suggestions? or do I have to move to multiple JS files?

Moreover, instead of writing inline javascript, I’m using

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

function textchange(function { $(".textbox_class").change(.....)});

It works in Chrome etc, but not for IE 7 (mb IE8 as well)

Can anyone help me?

Thanks a lot.

  • 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-18T02:17:03+00:00Added an answer on May 18, 2026 at 2:17 am

    There’s a couple different ways you could do this.

    Personally, I don’t see anything wrong with having a $(document.ready( on each page. Keep all your functions in a single .js file, but it is pretty handy (and still lightweight) to just have some simple init functions on each page. In that case you would do the same thing you had:

    //On the single page you want the function called on
    $(document.ready(function() {
         textchange();
    });
    

    If you don’t want to have a $(document).ready() on your child page, you could use an if statement in your .js file. Use window.location.pathname to get the path to your file, and check this against what it should be for your child page. Your code might look like this :

    //In your main .js file
    $(document).ready(function() {
         if(window.location.pathname == "/childPage.htm")
              textchange();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with asp.net website project that some of pages need authentication. I
I'm working on an ASP.NET website which targets desktop browsers. We want to enable
Right now I'm working with an ASP.NET website that automatically generates images and stores
I'm working on an ASP.NET website where I am using an asp:repeater with paging
I'm working on a .NET 3.5 website, with three projects under one solution. I'm
I'm working on an ASP.net 3.5 website with MooTools as the AJAX framework. I
I'm working on an asp.net web site. We have to use com interop to
I have a Single Sign-on solution which is working great in our test environment.
The Scenario: I have an asp.net website where I show a div popup on
I'm working on a website with legacy Classic ASP pages (being converted to ASP.NET

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.