Skip to content

Instantly share code, notes, and snippets.

@walterdavis
Created January 24, 2011 04:45
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 walterdavis/792846 to your computer and use it in GitHub Desktop.
Save walterdavis/792846 to your computer and use it in GitHub Desktop.
var counties = new Element('select',{size:1,name:'counties'});
counties.options[0] = new Option('Choose a county','',true, false);
$H(data).keys().each(function(key){
counties.options[counties.options.length] = new Option(key, key, false, false);
});
$('someDivOnYourPage').insert(counties);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment