Ajax Autocomplete

Ajax Autocomplete

Hi there,

i am trying to get the jquery autocomplete to work, but i am new to javascript and jquery and i got a problem.

I want to realise autocomplete via ajax call on my wordpress site.
I think the json call is working. Firebug shows me that ajax returns a response in the form of:
["Name1", "Name2", Name3"]
But my search field does not display the list of suggestions. How can i put the ajax response into the autocomplete suggestions?
  1. jQuery("#s").autocomplete({  
  2.     source: function( request, response ) {  
  3.         jQuery.getJSON( MyAjax_object.ajaxurl + "?callback=?&action=myajax-submit",                                           request, response);
  4.     },
  5. });

Thanks a lot.