Ok well replace the multiple occurences of :
Code:
nchattd.innerHTML = xmlnode.getElementsByTagName('col_uname')[0].firstChild.nodeValue;
By :
Code:
if (xmlnode.getElementsByTagName('col_uname')[0].firstChild != null)
{
nchattd.innerHTML = xmlnode.getElementsByTagName('col_uname')[0].firstChild.nodeValue;
}
else
{
nchattd.innerHTML = '';
}
That should fix it, let me know please.