Invoking AJAX function post readystatechange

Currently, I am in the process of making an Ajax call to a server and attempting to invoke another function once the response is ready (readystatechanged). As of now, there isn't any serverside code implemented. Surprisingly, Chrome and Firefox encounter a failure when trying to execute the "another" function call. However, Internet Explorer 8 doesn't seem to have any issues with calling the function.

In both Chrome and Firefox, I can successfully create the XMLHttpRequest object (and an ActiveXObject in IE8), as well as utilize open, send, and receive readystate changes and status codes. Nevertheless, what Chrome and Firefox are incapable of doing is executing the functions "drawTable()" and "drawChart()".

if( xhr.readystate == 4 && xhr.status == 200 )
{
  drawTable();
  drawChart();
}

By using Firebug and the Google Chrome Script tool, I traced the execution back to the aforementioned if-statement. The member variables readystate and status hold the correct values. Unlike IE8, however, Chrome and Firefox do not proceed to call the functions outright.

Answer №1

There is a small mistake. The correct property should be readyState, please take note of the uppercase S.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Utilizing jQuery and AJAX for submitting multiple POST requests

Experiencing a problem with posting data via AJAX using a drag and drop interface. The data is being sent to the POST URL as intended, but there's a recurring issue where the POST request occurs twice, causing the processing URL to handle the data aga ...

Retrieve all findings related to an ongoing loop update issue within react-table

Check out this Playground Sandbox where custom hooks for react-table have been set up to allow for customized search and row selection features. However, after selecting a single row, some unexpected behavior occurs, including the select All option not f ...

The grid fails to apply remote filtering values when an additional Nested ajax call is incorporated alongside the current HttpProxy configuration

Whenever I click for filter/sort for remote filtering, Forms.asp triggers using a proxy and automatically reloads. Previously, when I used the script below to reload the ExtJS grid with Forms.asp returning new XML with filtered grid data, everything worked ...

Image sliders are not compatible with ajax content loaders as they do not function properly together

My image slider works fine on its own, but when combined with my ajax content loader, it stops working. Additionally, the image slider only functions properly after refreshing the page on my website. Can anyone suggest a solution to make them work togeth ...

Implementing AngularJS within a standalone system devoid of internet connectivity

Hello there! I am interested in creating a single page web application for an embedded system that won't have access to the internet. This means I need to develop it without relying on external sources for functionality. Although I prefer AngularJS, ...

Utilize Node.js to traverse an array of objects and extract particular values to create a separate array

Looking to extract scores from the ratings array for each object and compile them into a new array. For instance, for post with post_id: "5e1223c2383ce049d8b32eb5", the associated array should be [1, 4]. And for the post with post_id "5e146b993dde720850c1 ...

The ancient oracle of Delphi and the modern login portal of Microsoft

I need to login to a site that utilizes . To streamline the process for end-users, I want to store credentials in an .ini file and inject them into a two-stage JavaScript online prompt. Is there a way to have Delphi run a program with a browser that auto ...

Using Vue to display a Div inside a TD element of a table does not result in a reactive behavior

I am encountering an issue with a table where the last column contains a div with three options (View, Edit, and Delete). This submenu is initially hidden, but when clicking on the options button in the last column of the table, the array used to control i ...

What causes the React Query cache to be cleared upon page reload?

Hi there, I am new to Next.js and React Query. I would really appreciate any help or advice. I apologize for any mistakes in my English language skills. Currently, I am using Next.js v12 and React Query v3, along with the React Query DevTools. On one of ...

When selecting an old list, only the most recently created ID is displayed, rather than the ID of the specific list being

I've set up a dashboard where I can create lists and have them displayed on the screen, but there seems to be an issue when trying to open any list as only the last created one opens. Can anyone point out what mistake I might be making? The technologi ...

Tips on boosting the speed and user-friendliness of your AJAX/REST application

Exploring the Essential Requirements of an Application I am currently developing a comprehensive application using AngularJS (but it could be any framework). This application interacts with a server built on Google App Engine through REST technology. Th ...

Accessing data from a PHP array using JQuery

I've been struggling with extracting data from a PHP array for quite some time now. Despite examining multiple examples, my code simply refuses to work and I can't figure out where I am going wrong. A Different Approach in PHP function fetchLat ...

What is the best location to incorporate global ajax error handling in Ember?

I am facing an issue with error handling in my application's adapter. I have set up error codes based on ajax errors and I handle them in the application route's error method. Everything works perfectly when I access a route via link-to. However, ...

Prevent multiple instances of Home screen app on iOS with PWA

There seems to be an issue with the PWA app not functioning properly on iOS devices. Unlike Android, where adding an app to your homescreen will prompt a message saying it's already installed, iOS allows users to add the app multiple times which is no ...

Load the dropdown menu in the select element using the AngularJS $ngresource promise

I have a select box on my webpage that I need to fill with data received from a server. I am currently using a service to fetch this data, but I'm unsure how to access the values returned from the promise and populate the ng-options in the select tag. ...

The onchange() function for a multi-checkbox dropdown is failing to work as

Issue with Multiple Drop Down Checkbox Functionality: The first parameter is always received as undefined, and the onchange event only captures the value of the first checkbox selected. <select name="multicheckbox[]" multiple="multiple" class="4colacti ...

Filter information by the K column within Google Script Editor on Google Sheets

For this particular case, I have data coming from a Google Sheet (4Cat) that is being transferred to another sheet (ImportFeeder) where my Google Script is executed. After executing the script provided below, I am looking to implement a filter script at t ...

The map displayed on google.com appears different from the one featured on our website

The integration of the JS for the Google map on our website is working smoothly without any issues. However, when I zoom into our address on google.com/maps, our Hotel is listed as "Hotel". On the map displayed on our website, there are only a few entries ...

Client-sessions in ExpressJS fail to persist session data

I recently integrated the client-sessions module into my Express backend. After setting it up as follows: var sessions = require('client-sessions'); app.use(sessions({ cookieName: Constants.CLIENT_SESSION_NAME, // pi_client_session ...

Using Internet Explorer to watch full-screen HTML 5 videos

I am in the process of developing my own HTML 5 Browser Player. Everything seems to be working well, except for getting the full screen feature to function properly in IE 10. Chrome, Safari, and Firefox are all doing great with it. Unfortunately, my JavaS ...