Solved

IE leaving &nbsp in innerHTML after being cleared

Posted on 2006-07-03
3
529 Views
Last Modified: 2012-06-27
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
Comment
Question by:sbaylis
  • 2
3 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 250 total points
ID: 17030533
How about:

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


Do you know PageSpy: http:/M_1344026.html

0
 

Author Comment

by:sbaylis
ID: 17030572
Good call.... Worked like a charm. Thanks!
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 17030583
You are welcome.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question