But you're not doing it with straight JavaScript, you're doing it with jQuery. And in jQuery, you want to use the .prop() function to set a property, so you would do it like this: $("#my_stuff").prop('selectedIndex', 4); Anyway, just make sure your id is unique. Otherwise, you'll be banging your head on the wall wondering why this didn't work. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.