Pages

Thursday, April 14, 2011

Javascript - Select by value


function selectItemByValue(elmnt, value){

for(var i=0; i < elmnt.options.length; i++)
{
if(elmnt.options[i].value == value)
elmnt.selectedIndex = i;
}
}

Monday, April 4, 2011

Methods Example

The following is an example of how to use a sub and a function in order to reuse code.