[thelist] AJAX: Getting External Content by DIV?

Jon Hughes hughesj at firemtn.com
Thu May 31 15:24:12 CDT 2007

Thanks for the help!  Funny, the only book I have ever bought is
Bulletproof Ajax, which is sitting, open, right next to my keyboard :)
I just haven't read all the way through it yet.

Thanks again!
 - Jon

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Ben Glassman
Sent: Thursday, May 31, 2007 1:21 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] AJAX: Getting External Content by DIV?


When you fetch a document that is valid XML (in this case an XHTML file)
using Ajax you can access its XML tree via responsexml. You can then
traverse its DOM using the Javascript DOM methods (getElementsByTagName,
getElementById, etc.). From there you can generate whatever HTML you
via createElement, createTextNode, etc. and append it to your document.

The book Bulletproof Ajax[1] by Jeremy Keith is a great introduction to
and includes coverage of how to do something like this. He has an
where he is pulling contact information from an xml file, using it to
html and inserting that into his document similarly to what you want to

[1] http://bulletproofajax.com/
[2] http://bulletproofajax.com/code/chapter04/xml/people/index.html

* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 

More information about the thelist mailing list