Skip to content

Instantly share code, notes, and snippets.

@foxxtrot
Created July 17, 2009 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxxtrot/149176 to your computer and use it in GitHub Desktop.
Save foxxtrot/149176 to your computer and use it in GitHub Desktop.
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