RollerCosta
RollerCosta

Reputation: 5196

JQuery test failed...need solution

I did everything mentioned on http://volaresystems.com/Blog/post/Autocomplete-dropdown-with-jQuery-UI-and-MVC.aspx
but i got nothing when i type a-z in my textbox

My form

<%using (Html.BeginForm("")) %>
<%:Html.TextBox("completeMe","name") %>
<%:Html.TextBox("completeMe","ID") %>
<input type="submit" value="submit"/>
<%} %>

Assemblies

<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
<link href="../../Content/themes/base/jquery.ui.all.css" />
<link href="../../Content/themes/base/jquery.ui.autocomplete.css" type="text/css" />
<script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.autocomplete.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.16.min.js"type="text/javascript"></script>

Upvotes: 0

Views: 117

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1039200

I did everything mentioned on http://volaresystems.com/Blog/post/Autocomplete-dropdown-with-jQuery-UI-and-MVC.aspx

I can't see many things in common between the script inclusions you did and the ones mentioned in the article. You have included the jquery UI twice. Also you hardcoded your urls instead of using url helpers as shown in the article. Also you are using different versions of jquery and jQuery UI so make sure those scripts are available in your scripts folder. So try the following:

<link href="<%= Url.Content("~/Content/Site.css") %>" rel="stylesheet" type="text/css" />
<link href="<%= Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" />
<link href="<%= Url.Content("~/Content/themes/base/jquery.ui.autocomplete.css") %>" type="text/css" />

<script src="<%= Url.Content("~/Scripts/jquery-1.7.1.min.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/Scripts/jquery-ui-1.8.16.min.js") %>" type="text/javascript"></script>

Then open up your javascript debugging tool in your browser and look if you don't get some javascript errors, wrong url paths, ...

Upvotes: 1

Related Questions