• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 538
  • Last Modified:

IE leaving &nbsp in innerHTML after being cleared

Hello Everyone,

I am currently programming a folder interface in ajax and am having an issue with IE.  

I am currently using a div to display folder information when the folder is clicked, then clearing it when the folder is clicked again.  Whats happening, is the IE seems to be leaving an   in the div after I set it to "".  The program can be seen at http://www.cipherintegrations.com/cfile/file.php ......

It works correctly in FireFox, but isn't quite right in IE... the relevent function seems to be:

function clearDiv(div) {      
  document.getElementById(div).innerHTML = "";      
}

Any ideas?

Thanks!
0
sbaylis
Asked:
sbaylis
  • 2
1 Solution
 
ZvonkoSystems architectCommented:
How about:

function clearDiv(div) {    
  document.getElementById(div).style.display="none";    
}


Do you know PageSpy: http:/M_1344026.html

0
 
sbaylisAuthor Commented:
Good call.... Worked like a charm. Thanks!
0
 
ZvonkoSystems architectCommented:
You are welcome.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now