I've got the following code which works only for 70 items. the moment I added the 71st item to the DB it fails to work.
$('document').ready(function() {
//autoComplete() returns a php array with all the products
<?php $productArray = autoComplete();?>
var js_products_array = <?php echo json_encode($productArray); ?>;
var result;
for(var i=0;i<js_products_array.length;i++){
result += js_products_array[i] + ', ';
}
//printing js_products_array
document.write(result);
$( "#autocompleteID" ).autocomplete({
source: js_products_array
});
...
I can see that js_products_array holds all the values but the autocomplete feature fails to work. The moment i remove the 71st item from the DB it works again.
I'm puzzled as to what's causing this. Would appreciate some help, cheers.