Why my autocomplete doesn't whant to be multiple ???

Posted by Toni Michel Caubet on Stack Overflow See other posts from Stack Overflow or by Toni Michel Caubet
Published on 2011-01-10T19:30:47Z Indexed on 2011/01/10 20:53 UTC
Read the original article Hit count: 174

please, give me a hand on this one; i'm trying to use autocomplete so user can enter tags by comma separated, example: 'autocomplete, jquery , next , last'

ok, i had the autocomplete working by sending him an $array with all the tags of my website with the previous format aswell,

this is my code:

<?
$a = new etiqueta(0, '');
$b = $a->autocomplete_etiquetas();
mostrar_notificacion('autocomplete_etiquetas_cargado?');
?>
<script type="text/javascript">
    function cargar_autocomplete_etiquetas(){
    $("#tags").autocomplete({
        source: [<? echo $b; ?>]      
    });
}

</script>

All i want it's user to select a tag, apply the ', ' and the autocomplete to be ready for next tag

i'm trying with (i know they are diff id's, also diff inputs):

<?
$b = new ingrediente(0, '');
$c = $b->autocomplete_ingredientes();
?>
<script type="text/javascript">
    function cargar_autocomplete_ingredientes(){
    $("#ingredientes").autocomplete({
        source: [<? echo $c; ?>],
        multiple: true,
        multipleSeparator: ", "


    });
}

</script>

But with out success....

10€ via paypal if answered before 23h (its 21:50 now), it's not much, it's an incentive :P

© Stack Overflow or respective owner

Related posts about php

Related posts about jQuery