Joined: Fri Jun 26, 2009 5:50 am Posts: 23 Has thanked: 0 time Have thanks: 0 time
Hi, The keystone of AJAX is the XMLHttpRequest object.
All new browsers use the built-in JavaScript XMLHttpRequest object to create an XMLHttpRequest object (IE5 and IE6 uses an ActiveXObject).
Let's update our "testAjax.htm" file with a JavaScript that creates an XMLHttpRequest object: <html> <body>
<script type="text/javascript"> function ajaxFunction() { var xmlhttp; if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else if (window.ActiveXObject) { // code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } else { alert("Your browser does not support XMLHTTP!"); } } </script>
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum