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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:29:46+00:00 2026-05-21T02:29:46+00:00

This was working on Friday, and now isn’t. I’ve got this at the beginning

  • 0

This was working on Friday, and now isn’t. I’ve got this at the beginning of a UserControl:

<link type="text/css" href="/App_Themes/css/ui-lightness/jquery-ui-1.8.11.custom.css" rel="stylesheet" />
<script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery-ui-1.8.11.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#MainContent_ucSearchControl_dpPickupStart").datepicker();
        $("#MainContent_ucSearchControl_dpPickupEnd").datepicker();
});
</script>

And further down, this:

 <td><asp:TextBox id="dpPickupStart" runat="server"  style="width: 65px"/></td>
 <td><asp:TextBox id="dpPickupEnd" runat="server" style="width: 65px"/></td>

Which results in (in the rendered page) input controls with:

name="ctl00$ctl00$MainContent$ucSearchControl$dpPickupStart" id="MainContent_ucSearchControl_dpPickupStart"
name="ctl00$ctl00$MainContent$ucSearchControl$dpPickupEnd" id="MainContent_ucSearchControl_dpPickupEnd"

And yet, every time the page loads, I get an Object Expected javascript error which points to the $(document).ready location.

What am I missing?

EDIT: Firebug is reporting that:
$ is not defined
[Break On This Error] $(document).ready(function () {

  • 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-21T02:29:46+00:00Added an answer on May 21, 2026 at 2:29 am

    Being a user control you cannot guarantee that the relative path to your JS files will always be correct depending on the location of the parent page in the file system hierarchy.

    Therefore change you JS script tags as follows to use the Control.ResolveUrl method which converts a URL into one that is usable on the requesting client.

    <script src='<%=ResolveUrl("~/Scripts/jquery-1.5.1.min.js")%>' type="text/javascript"></script>
    <script src='<%=ResolveUrl("~/Scripts/jquery-ui-1.8.11.custom.min.js")%>' type="text/javascript"></script>
    

    Or reference from a CDN for added performace bonus of caching.

    jQuery hosted on google
    jQuery UI hosted on google

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

Sidebar

Related Questions

This isn't working. Can this be done in find? Or do I need to
TLDR: Started with this question simplified it after got some of it working and
I've had this working before, but now it's not working and I've been tearing
Please can someone tell me why this isn't working before I defenestrate everything on
Although I know this isn't very efficient, I need to get this working fast
Looked at a tutorial but couldn't get this working: default.aspx: <%@ Page Language=C# ContentType=text/xml
I had this working to spec, until the specs changed. This function is now
so I got this working: -(void) ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *myTouch =
I had this working and now it is not. We have multiple developers working
So I had this working perfectly fine, but now for some reason I can't

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.