logo

RemoveItem JavaScript

JavaScript: The Definitive Guide
Author: David Nishimoto

function RemoveItem(lbxSelection,sKey)
{
	var srcLen = lbxSelection.options.length;
	for (var x=srcLen-1; x>=0; x--)
   	if (lbxSelection.options[x].value == sKey) 
    	{
		lbxSelection.options[x]=null;
	}
}

        
s