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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:34:04+00:00 2026-06-15T08:34:04+00:00

So I had code that was working properly on my site: $(#usr).load(somepage.php,{var1:var1,var2:var2}); But ever

  • 0

So I had code that was working properly on my site:

$("#usr").load("somepage.php",{var1:var1,var2:var2});

But ever since I changed some code in the navigation bar, jQuery has been acting really strangely. The first major problem was that this line:

var w = $(window).width();

returns the error: object [global] has no method "width()"

And that didn’t seem to matter, as all elements on the page functioned with that error (as if it was still being executed, because elements were still being placed)…but then I came to the page that implemented the first line of code, and I ran into the following error:

Cannot call method "load()" of null

Sure enough, I checked the console, and $(“#usr”) returns null, but I can see the HTML line in the page with the inline id of usr.

This causes a problem because I need to load data from that page for the page to function properly. But it gets even stranger. I thought I would just try a plain post request and take the data and use document.getElementById("usr").innerHTML = ... as a substitute, but I get the following error from this line:

$.post("somepage.php",{var1:var1,var2:var2},function(data){
    document.getElementById("usr").innerHTML = data;
});

Error:

Uncaught TypeError: Object function $(el){if(!el)return null;if(el.htmlElement)return Garbage.collect(el);if([window,document].contains(el))return el;var type=$type(el);if(type=='string'){el=document.getElementById(el);type=(el)?'element':false}if(type!='element')return null;if(el.htmlElement)return Garbage.collect(el);if(['object','embed'].contains(el.tagName.toLowerCase()))return el;$extend(el,Element.prototype);el.htmlElement=function(){};return Garbage.collect(el)} has no method 'post'

What the heck is going on with jQuery?

I’m importing 1.8.2 from googleapis

  • 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-06-15T08:34:06+00:00Added an answer on June 15, 2026 at 8:34 am

    That sounds a lot like you’re loading Prototype or MooTools or something as well as jQuery, and so Prototype/MooTools/whatever is taking over the $ symbol.

    If that’s what’s going on, and you need the other library, you can use jQuery.noConflict(). Then you either use the symbol jQuery instead of $ for your jQuery stuff, or you put all of your jQuery code into a function that you pass into jQuery.noConflict and accept $ as an argument, like so:

    // Out here, $ !== jQuery
    jQuery.noConflict(function($) {
        // In here, $ === jQuery
    });
    

    Or you can just do it yourself:

    // Out here, $ !== jQuery
    jQuery.noConflict();
    (function($) {
        // In here, $ === jQuery
    })(jQuery);
    

    ready also passes the jQuery object into the function, if you’re already using ready.

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

Sidebar

Related Questions

I had this working in an old code that I didn’t end up using...
I'm working on a web site project that is currently tracked in svn but
Edit: The site is working properly again. I deleted the line of code flagged
I had really a simple site written in PHP that I have just rewritten
Possible Duplicate: PHP Mail stops working without me editing the code I've had a
I had code that worked fine when running in the context of the main
I had some code that constructed an object: function gridObjConst(id, itemName, itemPrice, itemListPrice, width,
I had some code that ran commands through Runtime.getRuntime.exec(String) , and it worked on
I had a bunch of table views that had code duplicated in them. They
I had a piece of code that I was reading from a book and

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.