views:

333

answers:

2

Hi

I loaded some content in a DIV with AJAX. Then, i loaded different content from content that i loaded before. But it seems, previous loaded content is not gone, cuz there is a conflict between same named elements.

is there a way to clean up that previously loaded content?

Thanks in advance

+1  A: 
yourDiv.innerHTML = "";
Gregoire
oh...I actually assumed jQuery when I saw the question. Hmm.
Vincent Ramdhanie
A: 

You can always set a blank value to the div if you no longer need the content.

 $('#yourdiv').html("");
 //reload with AJAX
Vincent Ramdhanie
ok but how can i use AJAXUPLOAD plugin in the new loaded content, even though i didnt include it to page ??
Ahmet vardar
sorry i wrote wrong, i meant how i can use it? it is weird
Ahmet vardar
@Ahmet. Sorry my answer actually assumed you were using the jQuery library for JavaScript. If you are not you need to look at the answer given by @Gregoire.
Vincent Ramdhanie