On 2/9/06, Sebastian Kurt <[EMAIL PROTECTED]> wrote: > Hi, > I'm using PHP to fill my parameterlist for Autocompleter.Local as > shown in the example > (http://wiki.script.aculo.us/scriptaculous/show/Autocompleter.Local). > > <script type="text/javascript"> > new Autocompleter.Local('recipeNameAlternative', 'rezept_list', [ > <?php $ende = count($rezept_vorgabe); > for ($i=0;$i<$ende;$i++) { > echo '\''.$rezept_vorgabe[$i].'\''; > if($i != $ende-1) { > echo ","; > } > } ?> > ], {}); > </script> > > If the content of $rezept_vorgabe is over 30 elements long, my > JavaScript-Console returns the error "missing ] after element list". > AutoCompletion will not work!? > > Can someone give me a hint?
Do you have a live site we can look at? Do any of your elements contain a '? It would need to be escaped (\\\'). Todd _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs