Sunday, November 11, 2007

Ajax Using XMLHttpRequest object

Introduction
In all web application when you submit a button or sending a data to server the server each time deliver to you a new webpage.
What if I want just only a part of the webpage to be process and in this part get back another webpage content without reloading the whole page? How I can display data from another webpage in a DIV HTML element in the current page without loading the entire page.
Note: To read this article you must understand:
· HTML / XHTML
· JavaScript
What is Ajax?
Ajax is not an invention or a new programming language, it’s a web development technique witch build based on old ones (JavaScript, XML, HTML, CSS). Ajax is stand for (asynchronous java script and XML), and this technique make your web site more flexible faster friendly and more interactive, Ajax became popular in 2005 when Google use this new technology.
What Ajax Can Do?
What if I want just only a part of the webpage to be process and in this part get back only what the client needs without reloading the hole page ?!! This is what Ajax can do, with Ajax java script can communicate with server using XMLHttpRequest Object, and can exchange data with server. when you want to get or send data from server using JavaScript we make a form and post this data but unfortunately its reload anew web page with http request now we can get data from server behind the seen without reload the webpage, he will stay in the current page and will not notice any thing happened behind the seen.
I explain how to use ajax using XMLHttpRequest object in details in an article in codeproject.
Ttake your time reading the article and waiting for your comments, questions and queries .