title: Jquery ajax post not working on iPhone and Android
body: <p>I'm building a web application targeting mobile devices (specifically iPhone and Android).  I'm building it using ASP.NET MVC and JQuery.  On one page I have a cascading dropdown.  I've hooked up a function on the change event for the first dropdown and that does an AJAX call and uses the JSON response to populate the second dropdown.  This all works fine on my desktop, but does not work from an iPhone or Android phone.  The second dropdown is not populated.  I placed an "alert" in the change function and it verified that the event is being triggered.  I then placed the "alert" in the callback function for the AJAX call and it didn't get executed, so either the AJAX call is not hitting the server, or the response is not being received by the phone.</p>
  
  <p>The jQuery code is:</p>
  
  <pre><code>    $(function () {
      $("#ProgramId").change(function () {
          var programId = $("#ProgramId").attr("value");
          alert("Change event triggered"); // &lt;- test only, does get executed when client is a phone bowser
          var termId = $("#TermId").attr("value");
          $.post("/DealerHome/Terms", { "ProgramId": programId },
              function (data) {
                  alert("Ajax response received"); // &lt;- test only, does NOT get executed when client is a phone bowser
                  $("#TermId").children().remove();
                  $("#TermId").append('&lt;option value="0"&gt;--select--&lt;/option&gt;');
                  $.each(data, function () {
                      if (termId == this.Value) {
                          $("#TermId").append('&lt;option value="' + this.Value + '" selected &gt;' + this.Text + '&lt;/option&gt;');
                      } else {
                          $("#TermId").append('&lt;option value="' + this.Value + '" &gt;' + this.Text + '&lt;/option&gt;');
                      }
                  });
              });
      });
  });
  </code></pre>
  
  <p>I've turned on JavaScript Console on the iPhone, but it doesn't show any errors.  Being new to developing for mobile devices, I'm not sure how I should debug this.  On the desktop, I would just use Fiddler to see what's happening on the wire.  Any help is much appreciatec.</p>
  
  <p>Cheers</p>
  
  <p>Craig</p>