I think you should add a "label" value to the results


[{"id":1,"value":"villivakkam","label":"villivakkam",}]



On 29/09/2011 19:03, Sathia S wrote:
Hi,
I am working in basic of autocomplete in cakephp. When i enter th text in input, i request for server and return json output (i.e) it shows result in firebug. I am not getting list in view.

In view file

[code]

  $songs_array = array();
  foreach($songs as $key => $value){
array_push($songs_array, array("id"=>$key, "value" => strip_tags($value)));
  }
  echo json_encode($songs_array);

[/code]

It returns json as

[{"id":1,"value":"villivakkam"}]

when i checked in http://jsonlint.com/ it shows me valid json format.

Please tell me about this issue.

Thanks in advance


--
Regards

sathia
http://www.sathia27.wordpress.com

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at http://groups.google.com/group/cake-php

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to