On Jun 30, 3:38 am, Gearóid O'Ceallaigh <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using bassistance's autocomplete on a website (plugin page found > here:http://plugins.jquery.com/project/autocompletex). Its perfect > for I need since it allows the data for the autocomplete to be loaded > from a local array. However, whilst the autocomplete works fine in > most browsers - it seems that the length of the array is throwing up > an error in IE6. The array contains maybe 500+ elements of data but > even if I put them on a single line in the code, the error still gets > thrown up. > > Has anyone else ever had this problem?
It's possible but not real likely that IE6 has a bug preventing it from handling that many elements. Without seeing the error nobody can say for sure. Having programmed for a long-long time, my instinct is to say more likely it's some sort of quoting or delimiting bug in the array definition. With that many elements it's hard to scan through them by eye unless you have laid them out in a very organized fashion. Our eyes and brain are good at finding changes in a pattern of orderly rows and columns, not at finding a missing comma or quote in pages of characters. So, I always line my arrays up vertically into columns as much as possible. (A programming editor like vim with the align module makes it really easy.) My next thought is I would use an Ajax query to reduce the array of 500 down to something a lot more manageable. You don't say how big each element is, but that many elements will slow page load and rendering making your user's browser bog down a bit. Do you have the offending page somewhere that others can see it so they can try to figure out what's wrong? Don't post the code here as it'll cause screams as people open up that many lines of code.