Hi,

I am using javascript script in my page and work good in firefox and chrome, however in IE it doesn't.
This is the script:
Code:
<script type="text/javascript">
	(function(){
		list=document.getElementById('property-detail');
		for (i=1;i<=5;i+=2){
			item=list.childNodes[i];			
			for (j=0;j<=item.childNodes.length;j++){				
				if (item.childNodes[j]){
					if (item.childNodes[j].tagName=="UL"){
						ul=item.childNodes[j];
						for (k=0;k<=ul.childNodes.length;k++){								
							if (ul.childNodes[k]){
								if (ul.childNodes[k].tagName=="LI"){
									if (ul.childNodes[k].childNodes[1]){
										
										if (ul.childNodes[k].childNodes[1].nodeValue=="-")
								 			ul.childNodes[k].style.display="none";
									}
								}
							}
						}
					}
					
					if (item.childNodes[j].tagName=="LI"){
						
						if (item.childNodes[j].childNodes[0].childNodes[0].nodeValue == null){							
							item.childNodes[j].childNodes[0].style.display="none";		
						}
						
						if (item.childNodes[j].childNodes[1].childNodes[0].nodeValue == "-"){							
							item.childNodes[j].childNodes[1].style.display="none";		
						}												
					}			
				}
								
			}			
		}
		lastlist=list.childNodes[5];
		
		
		for (i=0;i<=lastlist.childNodes.length;i++){
			console.log(lastlist.childNodes[i]);
			if (lastlist.childNodes[i]){
				if (lastlist.childNodes[i].tagName=="LI"){
					console.log(lastlist.childNodes[i].childNodes[0]);
					console.log(lastlist.childNodes[i].childNodes[1]);
					
					if (lastlist.childNodes[i].childNodes[1]){
						if (lastlist.childNodes[i].childNodes[1].tagName=="SPAN"){
							console.log("nodevalue0" + lastlist.childNodes[i].childNodes[0].childNodes[0].nodeValue + (lastlist.childNodes[i].childNodes[0].childNodes[0].nodeValue == " ") );
							console.log("nodevalue1" + lastlist.childNodes[i].childNodes[1].childNodes[0].nodeValue + (lastlist.childNodes[i].childNodes[1].childNodes[0].nodeValue == "-") );
							if (lastlist.childNodes[i].childNodes[1].childNodes[0].nodeValue == "-"){
								if (lastlist.childNodes[i].childNodes[0]){
									if (lastlist.childNodes[i].childNodes[0].tagName=="SPAN"){
										if (lastlist.childNodes[i].childNodes[0].childNodes[0].nodeValue == " " ||  lastlist.childNodes[i].childNodes[0].childNodes[0].nodeValue == null){
											lastlist.childNodes[i].style.display="none";
										}
									}
								}
							}
						}
					}
					/*
					lastlist.childNodes[i].style.display="none";
					*/
				}
			}
		}
		
	})();
	</script>
This is the link:
http://barzilaymor.co.il/diur-plus.c...3%D7%99%D7%AA/

In chrome and firefox you don't see the empty rectangular (rectangular with dash is consider empty by me).

But in IE still see them.
Basically what my is doing is iterating over all the li element and checking if they contain some text (real text not dash), if they are not, then it cahnge their display property to none.

so my question is why in IE it doesn't work, while it is working perfectly in chrome and firefox?