typeahead.js remote method not working on pageload in laravel 3

235 views Asked by At

hi guys i am using typeahead.js in laravel mvc framework for php for items stored in database. when i write something in text box remote method not sending that URL to database to fetch item names. here is my code link of

js fiddle code [http://jsfiddle.net/karanpujara17/F7ZVY/][1]

i tried console.log by using custom events ,so when i clicked in text box then it "initialized" and there is message in console 'opened.

so remote method is not sending request to query that is on page items.list.....any suggestion will be really helpful.thanx in advance

1

There are 1 answers

0
Toby On

Your ID is th on the element but in the JS it is thh, this would certainly have an adverse effect!

If that is just a typo in your JsFiddle then I would suggest first of all remove the destroy() line, it serves no purpose and could be confusing matters.

If those things don't work I would maybe try renaming your changing the name parameter to something other than item, just in case this has been cached locally by your machine and refusing to send calls.

Hope those help!