Jump to content


This topic is now archived and is closed to further replies.


xmldoc has no properties error, please help!!

Recommended Posts

I have been trying to get this code running. Here is my code as it stands. The error I am getting is xmldoc has no properties....

My code:

var XMLHttpRequestObject = false;
XMLHttpRequestObject = new XMLHttpRequest();
else if(window.ActiveXObject){
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");

function showData(xmldoc){
var docElement, usernameNode, usernameidNode, displayText;

docElement = xmldoc.documentElement;
usernameNode = docElement.firstChild;
usernameidNode = usernameNode.nextSibling;

displayText = usernameNode.firstChild.nodeValue + ' ' + usernameidNode.firstChild.nodeValue;

var target = document.getElementById('usernameoutput');
target.innerHTML = displayText;

function getUsernames(){

var searchvalue = document.getElementById("uname").value;
var datasource = "search_profiles_now.php?searchvalue=" + searchvalue;

document.getElementById('loadimage').style.display = "inline";
XMLHttpRequestObject.open("GET", datasource, true);

XMLHttpRequestObject.onreadystatechange = function()
if(XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200){
var xmldocument = XMLHttpRequestObject.responseXML;
document.getElementById('loadimage').style.display = "none";

I am running firefox and have fire bug. My javascript is getting my xml data back to the browser but im still getting xmldoc has no properties. Any ideas?!

Share this post

Link to post
Share on other sites
Finally fixed my own issue. I was missing header("Content-type: text/xml"); in my xml document so javascript didnt know what it was looking at.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.