What is Ajax ?
--------------------
Use of ajax.. is with out submitting the page.. you contact the server
and get the response.. In face book you can easily observe that friend
requests and comments gets updated automatically with out refreshing the
page right ?
What is JQuery ?
---------------------
With jquery you can also develop ajax functionality.It is only one of hundreds
of functionalities provided by jquery.You can create calendar objects,
splash screens with jquery.
Advantage of Jquery can be explained with following example:
You can see from the following if else that In I.e you create xmlhttprequest
with new ActiveXobject("Microsoft.XMLHTTP")
In firefox,chrome,operat,safari you create using new XMLHttpRequest...
If you use jquery syntax to create ajax application, it will provide a method
for ajax, it internally has the code to check if your browser is mozilla or
i.e or firefox or operat... it hides the complexity of finding different browsers
from us.. you need not bother about adding code to check browser version,
it automatically checks the browser and create corresponding object....
Advantage of jquery is you can forget the browser incompatibilities.
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
No comments:
Post a Comment