The Mac Observer

Skip navigational links

You're viewing an article in TMO's historic archive vault. Here, we've preserved the comments and how the site looked along with the article. Use this link to view the article on our current site:
Web Developers: XMLHttpRequest Object Can Make Your Webpages Dynamic

Web Developers: XMLHttpRequest Object Can Make Your Webpages Dynamic

by , 9:00 AM EDT, May 25th, 2004

Web developers, take note: Are you looking for a clean, easy way to dynamically update information on your Web page using XML data without forcing the page to update? Apple may have just what you are looking for.

The XMLHttpRequest Object is a Document Object Model that allows you to create an interactive data exchange object on your Web page. Users can make selections, and the presented information can then change dynamically without a page refresh. This makes for a cleaner looking page and opens all sorts of options for making your pages and sites really stand out.

Here's some information from Apple:

For years, advanced client-side developers have frequently wanted a clean way to maintain a "connection" with the server so that transactions can occur in the background, and newly updated data gets inserted into the current page. Many have tortured themselves by using techniques such as hidden self-refreshing frames and "faceless" Java applets. In lieu of a W3C standard still under development, the Microsoft-born XMLHttpRequest object fills an important gap that should inspire application development creativity. The feature is a welcome addition to Safari.

There is a lot of technical information in Apple's developer Web page, and an example of how the XMLHttpRequest Object works. You can find more information at Apple's Developer's Web site.

The Mac Observer Spin:

This technology is cool, and should make many a web developer very happy; what's interesting, however, is that it was Microsoft who originated the object (for more information on the background of the technology check out the "History and Support" section of the page).

It's nice to see some ideas flow from Big Redmond for a change. Seriously.

Observer Comments

Show: Subjects Only | Full Comments
Close Name:ld Posts: 9 Joined: 20 Mar 2004
Subject: Cheers

Thanks for the link...

Close Name:DrShakagee -   TMO Forum Mod Posts: 941 Joined: 14 Jun 2001
Subject:

Looks really nice, does anyone know how many browsers on PC it works with? It seems to work on all the newer mac browsers (except IE).

Close Name:Guest
Subject: Browser support

On Windows the browsers that support XMLHTTPRequest are IE 5+ and Netscape 6+. IE uses ActiveX for this object, so to make it work cross-browser I use the following code (haven't tested in Safari).

if (window.XMLHttpRequest){
var XMLHttp = new XMLHttpRequest();
}
else if (window.ActiveXObject){
var XMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
}

Comment on this Article


You cannot edit your comments.   You cannot delete your comments.

Comments are currently closed. Please email the author instead.


Recent Headlines - Updated November 21st

Fri, 7:07 PM
Games - Soccer Sim Championship Manager 2010 Released for Mac
6:47 PM
Games - EA Publishes Original Monopoly for iPhone
6:15 PM
News - Original Apple I on Ebay for $50K, w/Letter from Steve Jobs
6:11 PM
Games - New iPhone Games: Secret of the Lost Cavern Ep 1, New DJ Nights, More
5:47 PM
Games - Star Trek D-A-C Game Headed to the Mac Next Month
4:57 PM
Product News - TidBITS Releases “Take Control of Syncing Data in Snow Leopard”
4:26 PM
John Martellaro's Blog - Particle Debris (week ending 11/20) Stationery Pads Go Poof
2:59 PM
Free on iTunes - Musée du Louvre, Art Lite, SketchBook Mobile X and More.
1:50 PM
Deal Brothers - Acer P215H bmid 21.5” Widescreen LCD Monitor:  $139.99
11:24 AM
TMO Appearances - Jeff Gamet Shares More Holiday Gift Ideas on MacJury
10:43 AM
Product News - Cocktail 4.5 for Leopard Adds QuickLook Cache Clearing
10:06 AM
News - Hack Enables Mac OS X 10.6.2 on Netbooks

The Mac Observer Reader Specials

  • __________
  • Buy Stuff, Support TMO!
  • Podcast: Mac Geek Gab
  • Podcast: Apple Weekly Report
  • TMO on Twitter!