Take a look at this handy function:
// shortenOptions( selectElement[, maxLength] );
function shortenOptions(element, maxLength) {
var options = element.options,
option,
index;
maxLength = maxLength ? maxLength - 3 : 7;
for (index = 0; index < options.length; index += 1) {
option = options[index];
if (option.textContent.length > maxLength) {
option.textContent = option.textContent.substring(0, maxLength) + '...';
}
}
}
Simply provide a 'select' element and a maximum length when calling the function.
You have the flexibility to customize this function by incorporating logic to track selectedIndex and store values as needed.