gpt4 book ai didi

jquery - jquery-ui-1.10.0.js 中未处理的异常。 0x800a138f - Microsoft JScript 运行时错误 : Object expected

转载 作者:行者123 更新时间:2023-12-01 04:09:23 26 4
gpt4 key购买 nike

我正在 ie9 中开发 ASP-MVC 应用程序,当我加载第一个登录页面时,出现此错误;

Unhandled exception at line 6953, column 7 in .../Scripts/jquery-ui-1.10.0.js

0x800a138f - Microsoft JScript runtime error: Object expected

我查看 JQuery-ui-1.10.0.js 文件,找到了这段代码;

_search: function( value ) {
this.pending++;
this.element.addClass( "ui-autocomplete-loading" );
this.cancelSearch = false;

this.source( { term: value }, this._response() );
},

我发现发生这种情况的原因是;

this.source is set to null. 

但我一直无法找出这是为什么以及如何解决它。

我试图找到 this.source 的设置位置。我在 jquery-ui 中找到了这段代码;

_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;**
}

我已经突出显示了执行的代码(即第三个分支)以及 this.source 设置为 null 的位置。我无法进一步追溯。

我的查看源是;

<!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 a 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 is 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 is 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 is 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>

最佳答案

根据当前信息,我认为问题在于自动完成功能附加到每个输入标记,并且并非所有输入标记都定义了源选项。

一个可能的解决方案是将特定的类添加到将托管自动完成功能的字段fieldAutocomplete,然后使用更具限制性的选择器将自动完成功能仅附加到具有该类的元素。

喜欢:

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

关于jquery - jquery-ui-1.10.0.js 中未处理的异常。 0x800a138f - Microsoft JScript 运行时错误 : Object expected,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22606126/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com