admin管理员组文章数量:1430035
I have the following script inside my asp mvc 5 web project:-
$("input[data-autoplete-source]").each(function () {
var target = $(this);
target.autoplete({ source: target.attr("data-autoplete-source"), minLength: 1, delay: 1000 });
});
but i am getting the following exception :-
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'autoplete'
so can anyone advice what might be causing this error ? Thank
Edit Inside my _layout view i have the following:-
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
and on the view that is raising the error i define the following:-
@section Scripts{
@Scripts.Render("~/bundles/jqueryval")
<script src="~/Scripts/Custome.js"></script>}
where the cusotm.js contains my above auto plete code. i have noted another problem is that i have Ajax.BeginForm on my view, but it is working as normal form , and it is not generating Ajax requests, although i am loading the ~/bundles/jqueryval ? can you adivce ?
I have the following script inside my asp mvc 5 web project:-
$("input[data-autoplete-source]").each(function () {
var target = $(this);
target.autoplete({ source: target.attr("data-autoplete-source"), minLength: 1, delay: 1000 });
});
but i am getting the following exception :-
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'autoplete'
so can anyone advice what might be causing this error ? Thank
Edit Inside my _layout view i have the following:-
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
and on the view that is raising the error i define the following:-
@section Scripts{
@Scripts.Render("~/bundles/jqueryval")
<script src="~/Scripts/Custome.js"></script>}
where the cusotm.js contains my above auto plete code. i have noted another problem is that i have Ajax.BeginForm on my view, but it is working as normal form , and it is not generating Ajax requests, although i am loading the ~/bundles/jqueryval ? can you adivce ?
Share Improve this question edited Jun 20, 2014 at 0:23 John John asked Jun 19, 2014 at 23:53 John JohnJohn John 11 Answer
Reset to default 2If you don't have the .autoplete()
method, then that is probably because you don't have the right jQuery plugins loaded that contain that method.
If you intend to be using the autoplete method from the jQuery UI set of plugins, then you need to load that library before you can use this method.
本文标签:
版权声明:本文标题:jquery - 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'autocomplete' 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745416983a2657729.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论