Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax select list not working when IE is launch from WatiN
    text
    copied!<p>This issue that I'm having is not even a synchronization issue, where I'm waiting for the Ajax request to complete. I am having a problem where the ajax post doesn't even get triggered when IE is launched by WaitN. Here is my script:</p> <pre><code>$(document).ready(function () { $("form select").change(function () { $(this).parents().filter("form").trigger("submit"); }); $("form#theForm").submit(function (event) { event.preventDefault(); hijack(this, UpdateList, "html"); }); function hijack(form, callback, format) { $.ajax({ url: form.action, type: form.method, dataType: format, data: $(form).serialize(), success: callback }); } function UpdateList(result) { $("#results").html(result); } </code></pre> <p>Here is the html:</p> <pre><code> &lt;% using (Html.BeginForm("ControllerName", "ActionName", FormMethod.Post, new { id="theForm" })) { %&gt; &lt;table width="100%"&gt; &lt;tr&gt; &lt;td align="left"&gt; &amp;nbsp; &lt;/td&gt; &lt;td align="right"&gt; Fiscal Year &amp; Period: &lt;%= Html.DropDownList("period", Model.FiscalPeriodSelectList)%&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;% } %&gt; &lt;div id="results"&gt; &lt;% Html.RenderPartial("Setup", Model.ViewModel); %&gt; &lt;/div&gt; </code></pre> <p>Absolutely nothing happens when a different value is selected in the selectList. I've even left the browser open after test were done running so that I could manually change the select list. Still -- nothing happens. However, when I run the app though VS, the ajax post on the select list works perfectly. Is there something that's I'm not configuring properly?</p> <p>Edit: It may be important to note that I am logging in using Basic Authentication, both when I run the mvc app manually and when NUnit is running it. After further inspection, I realized that the everything but the AJAX call back is getting executed and when I capture the AJAX error in an "alert", I being shown "Unauthorized". I am still unsure how I can fix my issue and why I'm getting Unauthorized when I run my WatiN tests from NUnit, but I'm not getting it when I use the mvc application manually.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload