set drop down list value

set drop down list value

The last two lines of the following code is not setting the value of the selector unless i debug it within firebug.  when I set a breakpoint on those two lines it shows the val in the parentheses and it will set them correctly, but if I do not debug the script then it doesn't set them.  Anyone have an idea as to why?

  1. populateLists: function(executionLevel, contractor, program) {
          var _chart = this;

          $.each($('select#contractor option'), function() {
                if ($(this).val() != "all") {
                      $("select#contractor option[value='" + $(this).val() + "']").remove();
                }
          });

          $.each($('select#program option'), function() {
                if ($(this).val() != "all") {
                $("select#program option[value='" + $(this).val() + "']").remove();
                }
          });

          $.post(
                "BuildControls.ashx",
                {el:executionLevel,cont:contractor,prog:program},
                function(data, status, request){_chart.buildListCallback(data, status, request);},
                'json'
          );

          $('select#contractor').val(contractor);
          $('select#program').val(program);
    }