AJAX stands for "Asynchronous JavaScript And XML".
It is a browser technology independent of web server software. It can directly communicate with the server using the Javascript XMLHttpRequest object. We can say that by the use of this object, JavaScript has become able to trade data directly with the server. With an HTTPRequest, a web page can make a request to, and get a response from a web server without reloading the page. The user will stay on same page and he/she will not notice that scripts request pages or send data to a server in the background. The best example which we she everyday is google suggest. Now, we can assume how much an AJAX application is useful! But, it is not useful everywhere. It has also some drawbacks too. So, it is not preferable to apply AJAX everywhere.
There are two ways that AJAX can access the server.
Synchronous :- In this way, script stops and waits for the server to send back a reply before continuing.
Asynchronous :- In this way, script allows the page to continue to be processed and will handle the reply if and when it arrived. Due to implementation of this way, processing become richer,user friendly, smoother as well as reduce the gap between desktop application and web application.
AJAX is based on following web standards:
Properties of XMLHttpRequest object
It is a browser technology independent of web server software. It can directly communicate with the server using the Javascript XMLHttpRequest object. We can say that by the use of this object, JavaScript has become able to trade data directly with the server. With an HTTPRequest, a web page can make a request to, and get a response from a web server without reloading the page. The user will stay on same page and he/she will not notice that scripts request pages or send data to a server in the background. The best example which we she everyday is google suggest. Now, we can assume how much an AJAX application is useful! But, it is not useful everywhere. It has also some drawbacks too. So, it is not preferable to apply AJAX everywhere.
There are two ways that AJAX can access the server.
Synchronous :- In this way, script stops and waits for the server to send back a reply before continuing.
Asynchronous :- In this way, script allows the page to continue to be processed and will handle the reply if and when it arrived. Due to implementation of this way, processing become richer,user friendly, smoother as well as reduce the gap between desktop application and web application.
AJAX is based on following web standards:
- JavaScript
- XML
- HTML
- CSS
Properties of XMLHttpRequest object
- onreadystatechange
- readystate
- responseText
- responseXML
- status
- statusText
- open()
- send()
- abort()
- getAllResponseHeaders()
- getResponseHeaders()
- setRequestHeader()
google.load("jqueryui", "1.8.2");
var total;
total = jQuery.ajax({url: live_site+"/plugins/content/extravote/ajax.php",global: false, type: "POST",data: ({task : "getrating",cid:id,xid:xid,column_name:"rating_sum",dummy:new Date().getTime()}),
dataType: "text",async:false,
success: function(msg){ }
}
).responseText;
alert(total);dataType: "text",async:false,
success: function(msg){ }
}
).responseText;
No comments:
Post a Comment
Thanks for your valuable comments.