function clearListBox(listboxID)
{
// returns 1 if all items are sucessfully removed
// otherwise returns zero.
var mylistbox = document.getElementById(listboxID);
if(mylistbox == null)
return 1;
while(mylistbox.length > 0)
{
mylistbox.remove(0);
}
return 1;
}
Singleton implementation in c# with lock
16 years ago
3 comments:
Hi
Can we use
mylistbox=null;
to remove all options...
you may use :
list.innerHTML='';
if using jQuery, then
$('#listboxID').html('');
Post a Comment