I have an array of
about 6000 items and I'm trying to create a HTML pulldown
list by looping through the array and writing out option tags with the
values filled in from the array. I've encountered a terrible speed issue
when the browser tries to load it. I've tried a one dimensional array as
well as two with little improvement. Is there some faster way around this?
var pulldownFieldRS = new Array();
pulldownFieldRS[0] = new Array()
pulldownFieldRS[0][0] = '19901002DI';
pulldownFieldRS[0][1] = '64034';
. . .
pulldownFieldRS[5748] = new Array()
pulldownFieldRS[5748][0] = 'WWZ51';
pulldownFieldRS[5748][1] = '66848';
strPulldownMenu += "<select name='intMarketID'>";
var i;
for (i=0; i<pulldownFieldRS.length; i++)
{
strPulldownMenu += "<option value='" + pulldownFieldRS[i][1] + "'>" +
pulldownFieldRS[i][0] + "</option>";
}
strPulldownMenu += "</select>";
Thanks,
Jim Christiano
list by looping through the array and writing out option tags with the
values filled in from the array. I've encountered a terrible speed issue
when the browser tries to load it. I've tried a one dimensional array as
well as two with little improvement. Is there some faster way around this?
var pulldownFieldRS = new Array();
pulldownFieldRS[0] = new Array()
pulldownFieldRS[0][0] = '19901002DI';
pulldownFieldRS[0][1] = '64034';
. . .
pulldownFieldRS[5748] = new Array()
pulldownFieldRS[5748][0] = 'WWZ51';
pulldownFieldRS[5748][1] = '66848';
strPulldownMenu += "<select name='intMarketID'>";
var i;
for (i=0; i<pulldownFieldRS.length; i++)
{
strPulldownMenu += "<option value='" + pulldownFieldRS[i][1] + "'>" +
pulldownFieldRS[i][0] + "</option>";
}
strPulldownMenu += "</select>";
Thanks,
Jim Christiano
