If you want to delete all selected elements in a HTML select component here a small javascript function that will do the job.
function deleteFromSelect(list){
var i = 0;
var limit = list.options.length;
while(i < limit)
{
if(!list.options[i].selected)
{
i++;
}
else
{
list.options[i] = null;
limit--;
}
}
}
Wednesday, May 19, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment