Immigration Financial Information Bangladesh Gateway General World Cup Entertainment Programing University and College Scholarship Job Interview Health Job

Tuesday, March 24, 2009

Basic Ajax, What is Ajax?

AJAX stands for Asynchronous JavaScript And XML.

AJAX is a type of programming made popular in 2005 by Google (with Google Suggest).

AJAX is not a new programming language, but a new way to use existing standards.

With AJAX you can create better, faster, and more user-friendly web applications.

AJAX is based on JavaScript and HTTP requests.

With AJAX, your JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, your JavaScript can trade data with a web server, without reloading the page.

AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.

AJAX applications are browser and platform independent.

By using the XMLHttpRequest object, a web developer can update a page with data from the server after the page has loaded!


 
Simple Ajax Script:
 
function ajaxFunction()
{

var xmlHttp;
try
  {

// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
  {

// Internet Explorer
try
    {

xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
  catch (e)
    {

try
      {

xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
    catch (e)
      {

alert("Your browser does not support AJAX!");
return false;
}
}
}
}

No comments :

Post a Comment