bala3569 bala3569 - 4 years ago 146
Javascript Question

Remove(unselect) selected items from list box using javascript

I tried this,

document.getElementById('<% = ListBox1.ClientID %>').options.length = 0;
what this does is clear my items of my listbox.. I simply want to unselect the selected items.. Any suggestion...

Answer Source

ListBox1.selectedIndex = -1

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download