Use simple old javascript. jQuery is a great framework, but sometimes plain javascript is better, your case is an example... (IMO)
---- Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Fri, Feb 6, 2009 at 11:49 AM, JQueryProgrammer <jain.ashis...@gmail.com> wrote: > > I have two array of items containing the values and text to be > inserted in a Listbox. I had written the function as: > > array2Listbox = function(objListBox, arrValue, arrText) { > var oNewOption; > > return jQuery.each(arrValue, function(i) { > oNewOption = new Option(arrText[i], arrValue[i]); > objListBox[objListBox.length] = oNewOption; > }); > }; > > However I know jQuery would be much slower than direct for loop in > this case where the array size is approx 6000 elements. Can anyone > tell me a faster way to loop through the array and insert the elements > in Listbox.