# How to select the first option in a combo box?


Simply in jQuery (a Javascript framework - Write less, do more):

$("#div\_id option:first).attr("selected","selected"); 

Example: 

$('#myCombo').load(
                              'my\_combo.php?foo=bar',
                               function() {
                                     $('#myCombo option:first).attr("selected","selected");
                               }
                      );
html:

