title: external query from Intel XDK
body: <p>I'm writing my first XDK app that queries a CGI on a web server for a list of items that is used to populate a select list. This works fine on my desktop in the XDK emulator, but gives an HTTP error when ran in the "App Preview" app. I'm not sure where to begin trouble shooting this.</p>
  
  <p>the HTML</p>
  
  <pre><code>&lt;div id="csDiv"&gt;
      &lt;select id="customerID"&gt;
          &lt;option value="1"&gt;Customer 1&lt;/option&gt;
          &lt;option value="2"&gt;Customer 2&lt;/option&gt;
          &lt;option value="3"&gt;Customer 3&lt;/option&gt;
          &lt;option value="4"&gt;Customer 4&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>the jquery</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: httpsBase+"/cgi/appCustList.exe",
      error: ajaxError,
      success: function (r) {
          if (r.indexOf("error") &gt; -1) {
              alert(r);
               return false;
          } else {
                          var dta=r.replace(/(\r\n)/g, ""); // server appends crlf 
                          var ret=eval("[" + dta.split(",") + "]");       
  
                          if( ret[0][1] =="-1"){
                              alert("no customers found");
                              return;
                          }
  
  
      for(var i=0;i&lt;=ret.length-1;i++){        
           $('#customerID')
           .append($("&lt;option&gt;&lt;/option&gt;")
           .attr("value",ret[i][0])
           .text(ret[i][1]));             
      }
  </code></pre>
  
  <p>thanks</p>