Loading

Monday, February 11, 2008

Creating an XMLHttpRequest Object in JavaScript Video Tutorial 10




AJAX Stands for Asynchronous JavaScript And XML.which means we can interact with server asychronous manner.In this clip, Learn how to create XMLHttpRequestObject, which connects to the server for Microsoft and Non-Microsoft browsers.



Creating XMLHttpRequestObject varies by browsers

for checking Non-Microsoft Browsesrs, we use window.XMLHttpRequest

if this expression returns true then

XMLHttpRequestObject = new XMLHttpRequest();

statement to create new XMLHttpRequestObject


for Microsoft Browsers, we use window.ActiveObject expression

if this expression returns true then

XMLHttpRequestObject = new ActiveXObject();

to create the new XMLHttpRequestObject.


<script language = "javascript">
var XMLHttpRequestObject = false;

if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}
</script>

Know more about How to Create XMLHttpRequest object for Microsoft and Non Microsoft Browsers ?.

For the Ajax source code demonstrated in this video, follow this link "Fetching Data with Ajax"

SHARE TWEET

Thank you for reading this article Creating an XMLHttpRequest Object in JavaScript Video Tutorial 10 With URL https://x-tutorials.blogspot.com/2008/02/creating-xmlhttprequest-object-in.html. Also a time to read the other articles.

0 comments:

Write your comment for this article Creating an XMLHttpRequest Object in JavaScript Video Tutorial 10 above!