Navigation Menu
Alphabetical Listing
Site Contents

Site FAQ
About JSS
JavaScript Forum
JavaScript Tutorial
Friends of JSS

Link to Us
JavaScript Help
Contribute a script
Technology Jobs

Become a Partner

Internet.commerce

Be a Commerce Partner














Internet.com

IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Developer Channel

FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

Great Sites

DocJavaScript.com
dhtml.com
The Freebie Directory
TheFreeSite.com

Browse Doc JS's Tips!


Hiermenus Central


Promotions

Free Announcements


Social Bookmark

General

Use this script to load XML and HTML files with XMLHTTPREQUEST. In the

tag, just add the name of the file to load and the element to display the file in, usually a <div> element.

Notes

  • Created by: Eddie Traversa
  • Posted: August 31, 2005

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: ajaxLoader.js


CSS

Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


User Comments

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

15. From: thamil
09/08/2008 07:26:29

its very nice to understand and implement it... thanks..

14. From: phannarak
AJAX
08/10/2008 23:56:57

I love AJAX!

13. From: fnfzone
06/25/2008 05:18:43

Nice content. thanks

11. From: idleboy
Ie issue
01/16/2008 00:02:35

hi its not working properly in ie , i have to clear the cache evry time for this

12. From: Lee (Admin)
05/12/2008 11:51:25

You will need to submit your question to the JavaScript forums.

7. From: Robin
10/09/2007 06:34:11

Well, It just doesn't work. Do I need to do something with the page that's needs to be loaded in the div or do i need to change the xml file?(which is in the body onload)

8. From: Lee (Admin)
11/07/2007 15:26:38

You will need to submit your question to the JavaScript Forum for further help.

9. From: unanymus
05/03/2008 15:48:51

this guy's website doesnt exist! its one of those "What you need, when you need it" websites.

10. From: Lee (Admin)
05/12/2008 11:05:50

Thanks for the heads-up. I have removed the link.

6. From: Krishna
thanks for this cool script
10/08/2007 01:02:34

This is really a nice script and, simple to use and customize. I tried this in both IE and firefox and it works well.

next comments...

Do you write JavaScripts?
If you do, why not submit them to us?
We'll give you credit and a link back to your Web site.