removing all option of dropdown box in javascript
var select = document.getElementById('yourSelectBox');
while (select.firstChild) {
select.removeChild(select.firstChild);
}
document.getElementById('id').options.length = 0;
or
document.getElementById('id').innerHTML = "";