Javascript: Select option based on its contents
- by Zac Altman
Basically this, but in pure javascript:
http://stackoverflow.com/questions/2346257/how-to-get-value-of-select-tag-based-on-content-of-select-tag-using-nokogiri
So I have a select list with a lot of countries/states, and I want to be able to select one based on what is between the tags.
Argentina
(I know i could use the value, but each one is a random mesh of numbers, so i would have to collect each individual one - not economical...)