View Single Post
  #2 (permalink)  
Old October 14th, 2011, 11:36 AM
JackHerr JackHerr is offline
Authorized User
Points: 108, Level: 2
Points: 108, Level: 2 Points: 108, Level: 2 Points: 108, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2007
Location: North Salem, NY, USA.
Posts: 23
Thanks: 3
Thanked 0 Times in 0 Posts

Progress. Using NuGet, I downloaded the partial code for the Ajax Form and the Autocomplete. I have been able to get the form to work -- but not the autocomplete.

First, I had to change the references to jquery to 1.5.1 (which I should have known since the same issue arose in the tutorial).

Second, I corrected the ref cited on page 187 to unobtrusive jquery from two "/Scripts" to one (which I should have detected from the actual file path names in the project script files).

Third, I added a null ref to an alt source in the Ajax form helper in the Home Index view to avoid a highlighted error as follows (page 190): <img alt="" id="ajax-loader" . . . etc.

Fourth, I added the <div id="searchresults"></div> in the Home Index view for the helper to put the return results in.

This all made the form itself work. The following, though, for the autocomplete seems to comply with the book and the download, but didn't work:

First, I changed reference to ui as "jquery-ui-1.8.11.min.js" not "jquery-ui.min.js" (page 199). Downloaded code alerted me there.

Second, I changed to ref to content themes from "jquery-ui.css" (which is on page 200) to "jquery.ui.all.css" per the downloaded code. This didn't work, so I changed "all" to "autocomlete", which also didn't work.

Third, I wrapped the jQuery code in the MusicScripts.js cited on page 201 in "$(function(){. . . insert code here . . .});" per the download. The download did not have the text "input" as cited in the first line of the code on page 201. I tried it both ways, no joy either time.

I put the script ref's exactly as in the download, and also tried putting them all in the Home _Layout view. Neither worked.

So, I have my code exactly as the download but the autocomplete doesn't work. The form works once a value is entered and the search button is clicked.