title: AJAX dropdowns (HTML Select) in Firefox with jQuery
body: <p>Help! I am using jQuery to make an AJAX call to fill in a drop-down dynamically given the user's previous input (from another drop-down, that is filled server-side). In all other browsers aside from Firefox (IE6/7, Opera, Safari), my append call actually appends the information below my existing option - "Select An ". But in Firefox, it automatically selects the last item given to the select control, regardless of whether I specify the JQuery action to .append or to replace (.html()). </p>
  
  <pre><code>&lt;select name="Products" id="Products" onchange="getHeadings(this.value);"&gt;
    &lt;option value=""&gt;Select Product&lt;/option&gt;
  &lt;/select&gt;    
  
  function getProducts(Category) {
    $.ajax({
      type: "GET",
      url: "getInfo.cfm",
      data: "Action=getProducts&amp;Category=" + Category,
      success: function(result){
        $("#Products").html(result);
      }
    });
  };
  </code></pre>
  
  <p>Any thoughts? I have tried in the past to also transmit another blank first option, and then trigger a JavaScript option to re-select the first index, but this triggers the onChange event in my code, rather annoying for the user.</p>
  
  <hr>
  
  <p>Update:</p>
  
  <p>Here's an example of what the script would return</p>
  
  <pre><code>&lt;option value="3"&gt;Option 1&lt;/option&gt;
  &lt;option value="4"&gt;Option 2&lt;/option&gt;
  &lt;option value="6"&gt;Option 3&lt;/option&gt;
  </code></pre>
  
  <p>Optionally, if using the .html() method instead of the .append(), I would put another</p>
  
  <pre><code>&lt;option value=""&gt;Select a Product&lt;/option&gt;
  </code></pre>
  
  <p>at the top of the result.</p>
  
  <hr>
  
  <p>@Darryl Hein</p>
  
  <p>Here's an example of what the script would return</p>
  
  <pre><code>&lt;option value="3"&gt;Option 1&lt;/option&gt;
  &lt;option value="4"&gt;Option 2&lt;/option&gt;
  &lt;option value="6"&gt;Option 3&lt;/option&gt;
  </code></pre>
  
  <p>Optionally, if using the .html() method instead of the .append(), I would put another</p>
  
  <pre><code>&lt;option value=""&gt;Select a Product&lt;/option&gt;
  </code></pre>
  
  <p>at the top of the result.</p>