title: Unhandled exception in jquery-ui-1.10.0.js. 0x800a138f - Microsoft JScript runtime error: Object expected
body: <p>I am developing my ASP-MVC application in ie9, and when I load the first login page I get this error;</p>
  
  <blockquote>
    <p>Unhandled exception at line 6953, column 7 in
    .../Scripts/jquery-ui-1.10.0.js</p>
    
    <p>0x800a138f - Microsoft JScript runtime error: Object expected</p>
  </blockquote>
  
  <p>I look inside the JQuery-ui-1.10.0.js file and I find this code;</p>
  
  <pre><code>_search: function( value ) {
          this.pending++;
          this.element.addClass( "ui-autocomplete-loading" );
          this.cancelSearch = false;
  
              this.source( { term: value }, this._response() );
      },
  </code></pre>
  
  <p>I find that reason this happens is because;</p>
  
  <pre><code>this.source is set to null. 
  </code></pre>
  
  <p>But I haven't been able to find out why this is and how to fix it.</p>
  
  <p>I have tried to locate where this.source is set.
  I found this code in jquery-ui;</p>
  
  <pre><code>_initSource: function() {
          var array, url,
              that = this;
          if ( $.isArray(this.options.source) ) {
              array = this.options.source;
              this.source = function( request, response ) {
                  response( $.ui.autocomplete.filter( array, request.term ) );
              };
          } else if ( typeof this.options.source === "string" ) {
              url = this.options.source;
              this.source = function( request, response ) {
                  if ( that.xhr ) {
                      that.xhr.abort();
                  }
                  that.xhr = $.ajax({
                      url: url,
                      data: request,
                      dataType: "json",
                      success: function( data ) {
                          response( data );
                      },
                      error: function() {
                          response( [] );
                      }
                  });
              };
          } else {
              **this.source = this.options.source;**
          }
  </code></pre>
  
  <p>I have highlighted the code that is executed (ie the 3rd branch) and where this.source is set to null.
  I have not been able to trace back any further than that.</p>
  
  <p>My View Source is;</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --&gt;
  &lt;!--[if lt IE 7]&gt; &lt;html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"&gt; &lt;![endif]--&gt;
  &lt;!--[if IE 7]&gt;    &lt;html class="no-js lt-ie9 lt-ie8" lang="en"&gt; &lt;![endif]--&gt;
  &lt;!--[if IE 8]&gt;    &lt;html class="no-js lt-ie9" lang="en"&gt; &lt;![endif]--&gt;
  &lt;!-- Consider adding a manifest.appcache: h5bp.com/d/Offline --&gt;
  &lt;!--[if gt IE 8]&gt; &lt;html class="no-js" lang="en"&gt; &lt;!--&lt;![endif]--&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;SCD&lt;/title&gt;
      &lt;link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" /&gt;
      &lt;meta name="viewport" content="width=device-width" /&gt;
      &lt;link rel="SHORTCUT ICON" href="/favicon.ico" /&gt;
  
      &lt;link href="/dataTables/css/AutoFill.css" rel="stylesheet"/&gt;
  &lt;link href="/dataTables/css/demo_page.css" rel="stylesheet"/&gt;
  &lt;link href="/dataTables/css/demo_table.css" rel="stylesheet"/&gt;
  &lt;link href="/dataTables/css/demo_table_jui.css" rel="stylesheet"/&gt;
  &lt;link href="/dataTables/css/jquery.dataTables.css" rel="stylesheet"/&gt;
  &lt;link href="/dataTables/css/jquery.dataTables_themeroller.css" rel="stylesheet"/&gt;
  &lt;link href="/dataTables/css/TableTools.css" rel="stylesheet"/&gt;
  &lt;link href="/dataTables/css/TableTools_JUI.css" rel="stylesheet"/&gt;
  
      &lt;link href="/Content/superfish.css" rel="stylesheet"/&gt;
  &lt;link href="/Content/superfish-navbar.css" rel="stylesheet"/&gt;
  
  
      &lt;link href="/Content/themes/sunny/jquery-ui.css" rel="stylesheet"/&gt;
  &lt;link href="/Content/themes/sunny/jquery.ui.theme.css" rel="stylesheet"/&gt;
  
      &lt;link href="/Content/demos.css" rel="stylesheet"/&gt;
  
      &lt;link href="/Content/jquery.mobile-1.2.0.css" rel="stylesheet"/&gt;
  &lt;link href="/Content/jquery.mobile.structure-1.2.0.css" rel="stylesheet"/&gt;
  &lt;link href="/Content/jquery.mobile.theme-1.2.0.css" rel="stylesheet"/&gt;
  
      &lt;link href="/Content/PagedList.css" rel="stylesheet"/&gt;
  
      &lt;link href="/Content/css/bootstrap.css" rel="stylesheet"/&gt;
  &lt;link href="/Content/css/bootstrap-responsive.css" rel="stylesheet"/&gt;
  
      &lt;link href="/Content/Site.css" rel="stylesheet"/&gt;
  
      &lt;link href="/Content/jquery.jqGrid/ui.jqgrid.css" rel="stylesheet"/&gt;
  
      &lt;script src="/Scripts/modernizr-2.0.6-development-only.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/modernizr-2.6.2.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div class="page"&gt;
  
          &lt;section class="main-content"&gt;
  
  
  &lt;hgroup class="title"&gt;
      &lt;span style="margin-left:40px;"&gt;&lt;h2&gt;Log in.&lt;/h2&gt;&lt;/span&gt;
  &lt;/hgroup&gt;
  
  &lt;section&gt;
  
  &lt;form action="/" method="post"&gt;&lt;input name="__RequestVerificationToken" type="hidden" value="I-FFb6bdAvkOOiAvXXU3kBC2f8ovY_xH2Y0tG4craWHUa6oVcHH-V6zi2kJy4luADvcRN6e_EC9vyIA8QnIWSnocZqnRFV79uVl_3s_BndjE_3R2P0MFJMpsLfA0yte4_N4hyNXQj3livH-2fNZGmKnZGQscE-Qj6GbSIRivn6A1" /&gt;        &lt;div id="logon"&gt;
              &lt;fieldset&gt;
                  &lt;legend&gt;Account Information&lt;/legend&gt;
  
                  &lt;div class="editor-label"&gt;
                      &lt;label for="UserName"&gt;User name&lt;/label&gt;
                  &lt;/div&gt;
                  &lt;div class="editor-field"&gt;
                      &lt;input data-val="true" data-val-required="The User name field is required." id="UserName" name="UserName" type="text" value="geoffreypayne" /&gt; 
                      &lt;span class="field-validation-valid" data-valmsg-for="UserName" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/div&gt;
  
                  &lt;div class="editor-label"&gt;
                      &lt;label for="Password"&gt;Password&lt;/label&gt;
                  &lt;/div&gt;
                  &lt;div class="editor-field"&gt;
                      &lt;input data-val="true" data-val-required="The Password field is required." id="Password" name="Password" type="password" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="Password" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/div&gt;
  
                  &lt;div class="editor-label"&gt;
                      &lt;input data-val="true" data-val-required="The Remember me? field is required." id="RememberMe" name="RememberMe" type="checkbox" value="true" /&gt;&lt;input name="RememberMe" type="hidden" value="false" /&gt; 
                      &lt;label for="RememberMe"&gt;Remember me?&lt;/label&gt;
                  &lt;/div&gt;
  
                  &lt;p&gt;
                      &lt;input type="submit" class="btnSubmit" value="Log On" /&gt;
                  &lt;/p&gt;
              &lt;/fieldset&gt;
          &lt;/div&gt;
  &lt;/form&gt;
      &lt;/div&gt;
      &lt;script src="/Scripts/jquery-1.9.1.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery-migrate-1.1.1.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery-ui-1.10.4.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.unobtrusive-ajax.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.validate.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.validate.unobtrusive.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.calculation.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.columnizer.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.MultiFile.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.printElement.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.hotkeys.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.tablesorter.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jquery.tablesorter.pager.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/bootstrap.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/scd.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/dataservice.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/popupservice.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/hoverIntent.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/superfish.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/supersubs.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/AjaxLogin.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/jqprint.js"&gt;&lt;/script&gt;
  
      &lt;script src="/dataTables/Scripts/jquery.dataTables.js"&gt;&lt;/script&gt;
  &lt;script src="/dataTables/Scripts/TableTools.js"&gt;&lt;/script&gt;
  &lt;script src="/dataTables/Scripts/ZeroClipboard.js"&gt;&lt;/script&gt;
  &lt;script src="/dataTables/Scripts/jquery.jeditable.js"&gt;&lt;/script&gt;
  &lt;script src="/dataTables/Scripts/jquery.dataTables.editable.js"&gt;&lt;/script&gt;
  
      &lt;script src="/Scripts/scd-basket.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/scd-search.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/scd-companyDetail.js"&gt;&lt;/script&gt;
  
  
      &lt;script src="/Scripts/SCD/LogOn.js"&gt;&lt;/script&gt;
  &lt;script src="/Scripts/CapsLock.compressed.js"&gt;&lt;/script&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>