>All Tutorials 
Ajax and .NET Ajax and .NET RSS XML
Ajax and ColdFusion Ajax and ColdFusion RSS XML
Ajax and Java Ajax and Java RSS XML
Ajax and PHP Ajax and PHP RSS XML
Ajax and SOA Ajax and SOA RSS XML
Ajax Goodies Ajax Goodies RSS XML
Ajax Tool Ajax Tool RSS XML
Facebook MockAjax Facebook MockAjax RSS XML
Google Web Toolkit Google Web Toolkit RSS XML
JavaScript Framework JavaScript Framework RSS XML
Ruby on Rails Ruby on Rails RSS XML
Technique Introduction Technique Introduction RSS XML
Without XMLHttpRequest Without XMLHttpRequest RSS XML
Yahoo! UI Yahoo! UI RSS XML

Ajax with PHP using responseXML - ajax var function script xml php response values

 
Registered tutorials: 501
Registered Users: 32529



Rating: 5 out of 3 votes cast


  
Category: Ajax and PHP

Ajax with PHP using responseXML

Digg this   Post to del.icio.us

Abstract: The tutorial shows a very basic technique of using Ajax with the responseXML

I’ll start off with a very basic technique of using Ajax with the responseXML (not responseText). responseXML basically means that the returned values is in an XML format. The other option would be to use responseText which in many cases would be the simplest method. But true Ajax uses XML (as the X in the name suggests).

OK, let’s dive right into some code.

First we want to create the XML HTTP Request Object (this is always required!)

var http = createRequestObject();

function createRequestObject() {
	// find the correct xmlHTTP, works with IE, FF and Opera
	var xmlhttp;
	try {
  	xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
  catch(e) {
    try {
    	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(e) {
    	xmlhttp=null;
    }
  }
  if(!xmlhttp&&typeof XMLHttpRequest!="undefined") {
  	xmlhttp=new XMLHttpRequest();
  }
	return  xmlhttp;
}
  

 


Read Full Tutorial...



Reviews:

Rate and Review This Site

2007-04-11 09:03:04
I was looking for a beginner tutorial and have found many. This is the 2nd best one out of many (25 or so) I have tried. Thanks.




Statistic Information About this Resource:


Total Hits: 727
Unique Hits: 625


  Daily Weekly Monthly
  Unique Total Unique Total Unique Total
Average 1 1.1 5.8 6.7 33.3 38.1
Current 0 0 3 3 27 30
Previous 2 2 0 0 35 41
Nov 19 0 0 15 17 26 31
Nov 18 0 0 0 0 21 24
Nov 17 1 1 6 7 35 41
Nov 16 1 1 0 0 19 20
Nov 15 2 2 6 6 0 0
Nov 14 2 3 5 5 98 115
Nov 13 0 0 10 12 32 35
Nov 12 2 2 13 17 40 44
Highest 8 12 28 34 98 115


Script Execution Time: 0.35928 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2