Home Top Projects Tutorials Articles Submit Project
 
  • .NET Frameworks
  • Java Frameworks
  • PHP Frameworks
  • Ruby Frameworks
  • Other Frameworks
  • Cool AJAX sites
  • Ajax Resources
  • Ajax Tools
  • JavaScript frameworks
 
     
    • Star rating using CSS Sprite and Jquery
    • Simple Ajax Functions - Snippets
    • AJAX Was Here - Part 2
    • Introduction to JSON
    • How To Create Your Own Ajax Contact Form
    • Creating an Ajax Autocompletion Textfield with Dynamic Faces
    • Javascript Extender Control
    • Jquery Ajax Autocomplete Php
    • Dealing with the Flexibility of JavaScript
    • How to Test your JavaScript Code with QUnit
    Home » Tutorials » Instant Tutorial

    Instant Tutorial

    After taking a look at this tutorial and a couple others, I was dissapointed at the quality of the code so here’s a quick tutorial to get you jump started with AJAX (Asynchronous JavaScript + XML). I am using object detection and explain some of the caveats for doing what I am doing.

    Simply put, AJAX allows you to make a call to an http server (typically an RSS feed or a webpage), get it’s content and load them into your existing page without having to refresh the whole page. This means that services like email don’t have to reload the whole page everytime you click a message, saving on bandwidth (loading the header/footer all over again) and making things more efficient.

    On to the code:
    function loadurl(dest) { try { // Moz supports XMLHttpRequest. IE uses ActiveX. // browser detction is bad. object detection works for any browser xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { // browser doesn't support ajax. handle however you want } // the xmlhttp object triggers an event everytime the status changes // triggered() function handles the events xmlhttp.onreadystatechange = triggered; // open takes in the HTTP method and url. xmlhttp.open("GET", dest);

    Read Full Tutorial

    Copyrights Reserved AjaxProjects.com 2006-2013, Powered by Enozom - Mobile Development Company -Privacy Policy