pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

autocomplete problem

I follow this url.
https://getsatisfaction.com/apperyio/...

Image

Image

Image

Image

I done some mistake but i can't understand it what is the mistake??
how to do auto complete ?I do it as per my knowledge please help me

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

autocomplete problem

Hi Pritu,

How do you save a variable 'mySuggestions'? You would need to save a service response array in localStorage. If you need a search by 'SchemeName' value, run this code on Search service Success event:prearr = new Array();
$(data).each(function(){ arr.push($(this)[0].SchemeName); })
localStorage.setItem("mySuggestions", JSON.stringify(arr));/pre

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

autocomplete problem

thnks it working but how to show a list when i write in input box

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

autocomplete problem

Pritu,

Follow the URL you followed :)
https://getsatisfaction.com/apperyio/... See my first comment please.

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

autocomplete problem

I follow that step but not working it

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

autocomplete problem

Hello! Please check errors in console. Verify you've done everything as shown here https://getsatisfaction.com/apperyio/...

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

autocomplete problem

i follow all your step that in your first comment in url
https://getsatisfaction.com/apperyio/...

it's not working so what is remaining now??
Image

Image

Image

Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

autocomplete problem

Hi Pritu,

On Input event you pass to autocomplete a string, not an object. String are store in localStorage. You should add parsing string to an object on Input event, so use this code:prevar suggestions = JSON.stringify(localStorage.getItem("mySuggestions"));
Appery("inputcity").autocomplete({source: suggestions});/pre

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

autocomplete problem

I tried this but not working now
you can get more idea what is the problem
http://appery.io/app/mobile-frame?src...

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

autocomplete problem

Hello! In inputcity-Input-Run JavaScript instead prevar suggestions = JSON.stringify(localStorage.getItem("mySuggestions"));/pre should be prevar suggestions = JSON.parse(localStorage.getItem("mySuggestions"));/pre

Return to “Issues”