Checking the XMLHttpRequest Object's readyState property Ajax Tutorial 11

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"

Video Tutorial 9 Working With JavaScript in Browsers


Two JavaScript programs demonstrated in this video, examine the code


  • button.htm
    <html>
    <head>
    <title>Using buttons</title>

    <script language="javascript">
    function showAlert()
    {
    alert("Thanks for clicking.")
    }
    </script>
    </head>
    <body>
    <h1>Using buttons</h1>
    <form>
    <input type="button" onclick="showAlert()" value="Click Here">
    </form>
    </body>
    </html>

  • blusher.htm
    <html>

    <head>

    <title>
    Using JavaScript events
    </title>
    </head>

    <body onmousedown="document.bgColor='pink'">
    <h1>
    Clicking this page will turn it pink.
    </h1>
    </body>
    </html>



  • Just copy & paste them in notepad, save it with extension .htm and see the output on the Internet Browser.



Video Tutorial 8 Getting Instant Login Feedback


Follow the links, which are demonstrated in this videoYou can copy the code.We recommend you rewrite it as you go so you can actually learn something useful. Also, passing someone else's code as your own is just uncool.

Video Tutorial 7 Dragging and Dropping HTML Elements With Ajax


Follow the below links, which are demonstrated in this video

Video Tutorial 6 Getting the Answer With Autocomplete



This video about Autocomplete - using Ajax.In this program, user types the first few letters of an english word in the text field and pause for a second.they can use the arrow keys and mouse to navigate the list of suggestions. Tab, enter, or clicking will replace the contents of the text field with the selected entry from the list. Visit the Autocomplete demo page Ajax - Autocomplete

Video tutorials 5 Searching in Real Time with Live Searches



Follow the below links, which are demonstrated in this video

Video tutorial 4 Modifying Web Pages on the Fly



Visit the following links, which are demonstrated in this video

Video Tutorial 3 - Getting to know Ajax



Ajax techniques demonstration on Tom Riddle's Dairy As seen in 'Harry Potter and the Chamber of Secrets

Video Tutorial 2 : AJAX System Requirements



For the Ajax source code demonstrated in this video, follow this link "Ajax at work"

Video Tutorial 1 - AJAX Introduction



Useful Links on Adobe Flex

Your Ad Here

Latest Books on Adobe Flex