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

  • Home
  • SEARCH
  • 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 8550919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:04:37+00:00 2026-06-11T14:04:37+00:00

I have been assigned a task to upgrade JQuery 1.3.2 to the latest version

  • 0

I have been assigned a task to upgrade JQuery 1.3.2 to the latest version (currently 1.8.1) all seems to work fine after the upgrade apart from the $.ajax function, the following code calls the server and then execute the call back function doFurtherStuff to perform additional work:

function ChangeContent(url, somepageobject) {
   var xhrobj = $.ajax({
       url: url,
       context: somepageobject,
       callback: doFurtherStuff,
       success: function(data) {
                somepageobject.html($(data));
                this.callback.call(this.context[0], data); // >> Code breaks here
           }
  });
  return xhrobj;
 }

When running this block of code, server data comes back ok but then I get the following error:

IE10 and IE9:

JavaScript runtime error: Unable to get property ‘call’ of undefined
or null reference

Google Chrome:

Uncaught TypeError: Cannot call method ‘call’ of undefined

The object “callback” is undefined in 1.8.1 but all is fine in 1.3.2, I’m happy to change the code if necessary I just can’t figure out a way.

  • 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-11T14:04:38+00:00Added an answer on June 11, 2026 at 2:04 pm

    I have to answer my own question since all other solution (while correct) don’t solve my problem without changing the way clients (Callees) communicate and send parameters to the method, I’m unable to do that since I have no control over them (external clients).

    All I needed is changing “context” to “thecontext” in the above example to work on JQuery 1.8.1, here is the working code:

    function ChangeContent(url, somepageobject) {
       var xhrobj = $.ajax({
           url: url,
           thecontext: somepageobject,
           callback: doFurtherStuff,
           success: function(data) {
                    somepageobject.html($(data));
                    this.callback.call(this.thecontext[0], data); // >> Code breaks here
               }
      });
      return xhrobj;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been assigned wit the task to write a program that takes a
In fact I have been assigned with a task to secure my DLL, so
I need some help with a work project I have been assigned. At the
I'd like to create a procedure that selects all records that have been assigned
I've been assigned the task (for work) of working with PCAP for the first
I have been assigned to work on some legacy C++ code in MFC. One
I have been assigned the task of converting an SQL Server Database to an
I have been assigned to work on a Java/Flash/BlazeDS project. When I pull down
I have been assigned the task of unit testing a class that I never
HI, I have been assigned a task of exploring unit testing using tools available

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.