Solved

IE leaving &nbsp in innerHTML after being cleared

Posted on 2006-07-03
3
531 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jquery Ajax - on change event not being picked up 9 58
Diff of the day 2 38
Multiple of Image Swaps 5 41
Jquery syntax 12 26
This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

737 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