(autocomplete) syntax error on response parsing.

(autocomplete) syntax error on response parsing.

Hi all, i'm trying to use the autocomplete plugin with a remote call but i'm getting a weird problem:
the code correctly invoke the remote address and gets a response back, but it doesn't show anything in the textfield to which it's linked and throws a javascript syntax error.

Unfortunately the code isn't live so i can't show you a test page, but the code itself is really simple and perfectly works if the dataset with the possible matches is loaded locally.

Here's the code:

  1. $(document).ready(function(){
  2.     $("#C_BIN1").autocomplete("main.app", {
  3.         selectFirst: false,
  4.         extraParams: {FUNCTIONID: "RecuperoBin"}
  5.     });
  6. });


this is the textfield:

  1. <input type="text" name="C_BIN1" id="C_BIN1" class="textfield" size="8" maxlength="6" value=""/>
and this is an excerpt of the response:

             
  1. 270000
  2. 270001
  3. 270002
  4. 270003
  5. 270004
  6. 270005
  7. 270006

and, finally, here's what firebug debugs:

syntax error