Assalamualaikum and good day to everyone.
Lets persist with my new topic. AJAX and Jquery
Huh?
AJAX a.k.a Asynchronous JavaScript and XML. What I know
about AJAX is a new way to existing standards. We don’t need to refresh page or
reloading the whole page when transferring data happen. AJAX is really user
friendly. It is not like the classic web pages which do not have AJAX that
always reload the entire page and go to the other page. Here are the examples
of application that using AJAX:
·
Youtube
·
Facebook
·
Google search
That’s it. A short version of AJAX. It’s really simple to
understand it.
Now I wanna talk about Jquery. Jquery is a framework for
client. Its give easier to the client to open the web page. Commonly we use “jquery-1.3.2min.js”
for internet. Here are the examples of Jquery :
<script
src="jquery-1.3.2.min.js"></script>
<script type="text/javascript">
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");
}
function first(){
xmlhttp.open("GET","third.html",false);
xmlhttp.send();
document.getElementById("text").innerHTML
= xmlhttp.responseText;
}
function second(){
xmlhttp.open("GET","fourth.html",false);
xmlhttp.send();
document.getElementById("text").innerHTML
= xmlhttp.responseText;
}
function third(){
xmlhttp.open("GET","fifth.html",false);
xmlhttp.send();
document.getElementById(target
= "text").innerHTML = xmlhttp.responseText;
}
</script>
No comments:
Post a Comment