Sun Dial Menu
Menu The XMLHttpRequest Object
 

The XMLHttpRequest Object

The XMLHttpRequest Object is a means to retrieve data from your webserver in a manner that does not interupt the process that is of higher priority. An example would be the loading of a relatively complex webpage, with graphics that are required for navigation and to provide the user with a basis to proceed while data that would be required later could be loaded in the background.

An example could be a JSON data-structure that needs to be populated so that it can be integrated once the page has fully loaded. The population should not prevent the loading of the page and therefore giving the visitor time to make a decision on how to proceed.

In addition the XMLHttpRequest Object can be used to retrieve data without having to refresh the whole webpage and could be in response to a user action.

Background

This is my second page on AJAX (Asynchronous JavaScript And XML)

As I was saying on my previous page a lot has moved on since I was looking at this before. HTML5 is now the norm and AJAX has moved on from JSRS (JavaScript Remote Scripting) a venture that I was corresponding about with Brent Ashley.

Top

JSRS

When I was looking at this, pre September 2007, Brent was playing around with dropdown lists whos contents depended on the selection from a prior list. I had a working version of this on one of my earlier websites. I even seem to remember that Brent asked me if I would like to take the project over from him.

I have a historic link to Brents original website, sadly the site Ajax Patterns (ajaxpatterns.org) is up for sale. I hope that does not mean that Brent is no longer doing this fine work.

A quote from myself from 2011:

The reason that I did not reposted this demo as I decide not to implement php on my webserver at the time - /php/test/jsrsselect.php the work was based on work by Brent Ashley's work on JSRS.

How I could use XMLHttpRequest

As shown I can read from a file on the server and update the page. As I have access to a mySQL database I could use this to dynamically build content.

The page on MDN suggests that you may not to use XMLHttpRequest as it is a "historical" technique. The Fetch() API is a better solution.

Links

External Links Disabled.

tempusfugit.me.uk is a non-commercial website. No payment or benefit is gained by the placement of links to other websites.

The External link is disabled to on this page, please visit other pages

External

Site design by Tempusfugit Web Design -