Show XML content or not depending on if node is NONE or with content

Hi everyone,

I am trying to do the following with XML and Javascript:

[INDENT]If the XML tag <note> is not “NONE”, show the table row.
Else display: none;[/INDENT]

	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	n = xmlDoc.getElementsByTagName("note")[0].childNodes[0].nodeValue;
	var y=xmlDoc.getElementsByTagName("canceledDate");
	for (j=0;j<y.length;j++){
	if (n != "NONE"){
			document.write("<td colspan='4'>");
			document.getElementsByTagName("note").style.display = 'none';

My html page is showing up blank, and I’m missing understanding on how to figure this out at the moment. I had the page showing all content a bit ago, but now I lost it. I’m not sure if I stepped forward or backward a step toward a solution. Any help would be greatly appreciated. I hope I put this in the right section as it could be a JavaScript forum question too.

Thank you in advance for your time and help.