title: Combo box populated by Json
body: <p>I am looking to populate a combo box with a Json file that is representing the file contents of a folder in a directory. I have snippets of code but its obviously not working and I am unsure how to go about implementing it correctly. </p>
  
  <p>My Json code i want to populate the combo box looks like this:</p>
  
  <pre><code>["xml/cdcatalog.xml","xml/equip.xml"]
  </code></pre>
  
  <p>And this is the script i have embedded into the HTML page:</p>
  
  <pre><code>$(document).ready(function() {
      $("#list1").jCombo(function() {
          $.getJSON('Jsontest.php?q=' + escape($('#list1').val()), function(data) {
              if ($("#list1").val() &gt; 0) {
                  alert("You chose " + $("#list1").val());
              }
  
          });
      });
  });
  </code></pre>