[code]<html>
<head>
</head>
<body>
<script type=’text/javascript’>
var xmlHttp;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject(“Msxml2.XMLHTTP”);
}
catch (e)
{
try
{
xmlHttp=new ActiveXObject(“Microsoft.XMLHTTP”);
}
catch (e)
{
alert(“Your browser does not support AJAX!”);
}
}
}
xmlHttp.open(“GET”,”ajaxtext.php”,true);
xmlHttp.send(null);
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState==4)
{
xmlObjectThing = xmlHttp.responseXML;
alert(xmlObjectThing.getElementsByTagName(“firstname”)[0].nodeValue)
}
}
</script>
</body>
</html>
ajaxtext.php
[code]<?php
header(‘Content-Type: text/xml’);
header(“Cache-Control: no-cache, must-revalidate”);
echo ‘<?xml version=”1.0″ encoding=”ISO-8859-1″?>
<person>’;
echo “<firstname>head</firstname>”;
echo “<lastname>stupid</lastname>”;
echo “<age>900</age>”;
echo “<hometown>town</hometown>”;
echo “<job>crap</job>”;
echo “</person>”;
?>
Ok so I have that but it keeps returning null for nodeValue on the element firstname….. I have looked all through places searched google done all that stuff and I can’t find an answer for my problem….. I mean seriously why is it so hard for this to work