asp.net mvc - Unhandled exception in jquery-ui-1.10.0.js. 0x800a138f - Microsoft JScript runtime error: Object expected -


i developing asp-mvc application in ie9, , when load first login page error;

unhandled exception @ line 6953, column 7 in .../scripts/jquery-ui-1.10.0.js

0x800a138f - microsoft jscript runtime error: object expected

i inside jquery-ui-1.10.0.js file , find code;

_search: function( value ) {         this.pending++;         this.element.addclass( "ui-autocomplete-loading" );         this.cancelsearch = false;              this.source( { term: value }, this._response() );     }, 

i find reason happens because;

this.source set null.  

but haven't been able find out why , how fix it.

i have tried locate this.source set. found code in jquery-ui;

_initsource: function() {         var array, url,             = 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;**         } 

i have highlighted code executed (ie 3rd branch) , this.source set null. have not been able trace further that.

my view source is;

<!doctype html> <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> <!--[if lt ie 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if ie 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> <!--[if ie 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]--> <!-- consider adding manifest.appcache: h5bp.com/d/offline --> <!--[if gt ie 8]> <html class="no-js" lang="en"> <!--<![endif]--> <html lang="en"> <head>     <meta charset="utf-8" />     <title>scd</title>     <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />     <meta name="viewport" content="width=device-width" />     <link rel="shortcut icon" href="/favicon.ico" />      <link href="/datatables/css/autofill.css" rel="stylesheet"/> <link href="/datatables/css/demo_page.css" rel="stylesheet"/> <link href="/datatables/css/demo_table.css" rel="stylesheet"/> <link href="/datatables/css/demo_table_jui.css" rel="stylesheet"/> <link href="/datatables/css/jquery.datatables.css" rel="stylesheet"/> <link href="/datatables/css/jquery.datatables_themeroller.css" rel="stylesheet"/> <link href="/datatables/css/tabletools.css" rel="stylesheet"/> <link href="/datatables/css/tabletools_jui.css" rel="stylesheet"/>      <link href="/content/superfish.css" rel="stylesheet"/> <link href="/content/superfish-navbar.css" rel="stylesheet"/>       <link href="/content/themes/sunny/jquery-ui.css" rel="stylesheet"/> <link href="/content/themes/sunny/jquery.ui.theme.css" rel="stylesheet"/>      <link href="/content/demos.css" rel="stylesheet"/>      <link href="/content/jquery.mobile-1.2.0.css" rel="stylesheet"/> <link href="/content/jquery.mobile.structure-1.2.0.css" rel="stylesheet"/> <link href="/content/jquery.mobile.theme-1.2.0.css" rel="stylesheet"/>      <link href="/content/pagedlist.css" rel="stylesheet"/>      <link href="/content/css/bootstrap.css" rel="stylesheet"/> <link href="/content/css/bootstrap-responsive.css" rel="stylesheet"/>      <link href="/content/site.css" rel="stylesheet"/>      <link href="/content/jquery.jqgrid/ui.jqgrid.css" rel="stylesheet"/>      <script src="/scripts/modernizr-2.0.6-development-only.js"></script> <script src="/scripts/modernizr-2.6.2.js"></script>  </head>  <body>     <div class="page">          <section class="main-content">   <hgroup class="title">     <span style="margin-left:40px;"><h2>log in.</h2></span> </hgroup>  <section>  <form action="/" method="post"><input name="__requestverificationtoken" type="hidden" value="i-ffb6bdavkooiavxxu3kbc2f8ovy_xh2y0tg4crawhua6ovchh-v6zi2kjy4luadvcrn6e_ec9vyia8qniwsnoczqnrfv79uvl_3s_bndje_3r2p0mfjmpslfa0yte4_n4hynxqj3livh-2fnzgmknzgqsce-qj6gbsirivn6a1" />        <div id="logon">             <fieldset>                 <legend>account information</legend>                  <div class="editor-label">                     <label for="username">user name</label>                 </div>                 <div class="editor-field">                     <input data-val="true" data-val-required="the user name field required." id="username" name="username" type="text" value="geoffreypayne" />                      <span class="field-validation-valid" data-valmsg-for="username" data-valmsg-replace="true"></span>                 </div>                  <div class="editor-label">                     <label for="password">password</label>                 </div>                 <div class="editor-field">                     <input data-val="true" data-val-required="the password field required." id="password" name="password" type="password" />                     <span class="field-validation-valid" data-valmsg-for="password" data-valmsg-replace="true"></span>                 </div>                  <div class="editor-label">                     <input data-val="true" data-val-required="the remember me? field required." id="rememberme" name="rememberme" type="checkbox" value="true" /><input name="rememberme" type="hidden" value="false" />                      <label for="rememberme">remember me?</label>                 </div>                  <p>                     <input type="submit" class="btnsubmit" value="log on" />                 </p>             </fieldset>         </div> </form>     </div>     <script src="/scripts/jquery-1.9.1.js"></script> <script src="/scripts/jquery-migrate-1.1.1.js"></script> <script src="/scripts/jquery-ui-1.10.4.js"></script> <script src="/scripts/jquery.unobtrusive-ajax.js"></script> <script src="/scripts/jquery.validate.js"></script> <script src="/scripts/jquery.validate.unobtrusive.js"></script> <script src="/scripts/jquery.calculation.js"></script> <script src="/scripts/jquery.columnizer.js"></script> <script src="/scripts/jquery.multifile.js"></script> <script src="/scripts/jquery.printelement.js"></script> <script src="/scripts/jquery.hotkeys.js"></script> <script src="/scripts/jquery.tablesorter.js"></script> <script src="/scripts/jquery.tablesorter.pager.js"></script> <script src="/scripts/bootstrap.js"></script> <script src="/scripts/scd.js"></script> <script src="/scripts/dataservice.js"></script> <script src="/scripts/popupservice.js"></script> <script src="/scripts/hoverintent.js"></script> <script src="/scripts/superfish.js"></script> <script src="/scripts/supersubs.js"></script> <script src="/scripts/ajaxlogin.js"></script> <script src="/scripts/jqprint.js"></script>      <script src="/datatables/scripts/jquery.datatables.js"></script> <script src="/datatables/scripts/tabletools.js"></script> <script src="/datatables/scripts/zeroclipboard.js"></script> <script src="/datatables/scripts/jquery.jeditable.js"></script> <script src="/datatables/scripts/jquery.datatables.editable.js"></script>      <script src="/scripts/scd-basket.js"></script> <script src="/scripts/scd-search.js"></script> <script src="/scripts/scd-companydetail.js"></script>       <script src="/scripts/scd/logon.js"></script> <script src="/scripts/capslock.compressed.js"></script>   </body> </html> 

with current informations, think problem autocomplete attached every input tag, , not there source option defined.

a possibile solution add specific class fields host autocomplete fieldautocomplete use more restrictive selector attach autocomplete elements have class.

like:

$( "input.fieldautocomplete" ).autocomplete({ }); 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -