Click here to Skip to main content
15,906,947 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In master page I wrote:
<script src="../Scripts/MicrosoftAjax.js"></script>
    <script src="../Scripts/MicrosoftMvcAjax.js"></script>
    <script src="../Scripts/jquery-2.1.1.min.js"></script>
    <script src="../Scripts/PersonScript.js"></script>
    <script src="../Scripts/PersonIndexScript.js"></script>
---------------
In Index view I wrote:
...
<link href="../Content/jquery.autocomplete.css" rel="stylesheet" />
    <script src="../Scripts/jquery.autocomplete.min.js"></script>
    <script src="../../Scripts/PersonIndexScript.js"></script>
...
    <input type="text" id="txtSearch" name="query" />
------------------
In PersonIndexScript.js I have:

/// <reference path="jquery.autocomplete.min.js" />
/// <reference path="jquery-2.1.1.intellisense.js" />

$(function () {
    $("#txtSearch").autocomplete("/Person/SearchCandidates",
                                    {minchar : 3});
});
----------
In IE11 I got the error "Object doesn't support property or method 'autocomplete'"
In Chrome and firefox It makes no difference and It doesn't work.
Posted
Updated 14-Jun-14 1:16am
v2
Comments
karthik Udhayakumar 14-Jun-14 8:00am    
Hello Fariba,
Not clear but
<script src="../Scripts/PersonIndexScript.js"></script> has been referenced twice..Check once if this is causing the trouble

1 solution

You forgot to add reference, in your master page, to the jvascript "jquery-ui-1.8.20.js" ( or a new version) that provides the autocomplete functionalities.
 
Share this answer
 
Comments
Raul Iloc 16-Jun-14 4:06am    
You should use compatible version of JavaScript libraries. Regarding the "opera", you didn't provide details about PersonScript.js and PersonIndexScript.js, so maybe the error is there!?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900