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

The Archive Base Latest Questions

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

I have an error trying to use $(document).ready() as in the above image. What

  • 0

enter image description here

I have an error trying to use $(document).ready() as in the above image.
What should i try to solve this problem ?


Edit 23/05/2011 10:54

I have got a clue.
The page i am working inherit from masterpage

In master page this code isn’t work, maybe problem of different path

<head id="Head1" runat="server">
<title>Back Office</title>
<link href="~/Styles/MasterPage.css" rel="stylesheet" type="text/css" />
<link href="Styles/custom-theme/jquery-ui-1.8.12.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="scripts/jquery-1.5.1.min.js"></script>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>

This code don’t seems to work

On the body of master page, there is a script manager and jquery is there,
This make the jQuery works, is because we use scriptmanager in the body so that the document.ready is not work ?

            <asp:ScriptManager ID="ScriptManager1" runat="server" OnAsyncPostBackError="ScriptManager1_AsyncPostBackError">
                <Scripts>
                    <asp:ScriptReference Path="~/Scripts/jquery-1.5.1.min.js" />
                </Scripts>
            </asp:ScriptManager>
            <asp:ContentPlaceHolder ID="MainContent" runat="server">
            </asp:ContentPlaceHolder>

I have found the problems.

The problem is the jquery code is on the masterpage, in the script manager, and script manager is in inside the body tag.

the document.ready is on the header tag on page that inherit on master page, so before the code to excuting to the body, the jquery is not included yet and that wat it is error.

The easiest way to solve this is, i have to move javascript code in the bottom of body tag.
The proper way to solve, which i still can’t find is to put the javascript include code in the header. but i don’t find a way that work yet. My master page and inherit page is on the differnt path. I have find a lot of technique such as but none of them work.

  • 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-22T19:03:19+00:00Added an answer on May 22, 2026 at 7:03 pm

    Take out all of the other javascript includes except for jquery-1.5.1.min.js. Try it with just that one include. If that works, add the other includes back in one at a time until you get the error. If it doesn’t work with just the jQuery script included, chances are it’s not pointing at the correct path.

    Short answer though, yes, you can use jQuery and document.ready in an ASP.NET page.

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

Sidebar

Related Questions

I am trying to have an error message when the use enters a number
I have this error when trying to generate the meta model with JOOQ: org.jooq.exception.DataAccessException:
I have encountered this error when trying to delete a cell, using a custom
I have this error when I am trying to read the file: Exception in
This time I have an error which I have been trying again to figure
I get this error when trying to link a win32 exe project. I have
I'm trying to use Ajax of jQuery, I have this code below and although
I'm trying to use AJAX with web2py language but I have a problem My
I'm trying to use the jQuery grid. I keep getting this error at the
I have an error in MVC/Controllers/ProductCOntroller.cs when trying to build solution. Need to have

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.