Instantly share code, notes, and snippets.

Embed
What would you like to do?
YUI().use('node', function(Y) {
buildSelectedList = function(selectBox) {
var list = "",
optList = Y.NodeList.getDOMNodes(selectBox.get('options'));
for (var i = 0 ; i < optList.length ; i += 1) {
if (optList[i].selected) {
if (list !== "") { list += ","; }
list += optList[i].value;
}
}
return list;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment