Hi there,
i use javascript to populate a drop down from an object, problem is, my lists can run to 100's or 1000's of entries. This causes them to populate very slowly. i know from a user interface point of view, this is bad design,but my hands are tied to using drop downs. ill post an example below, if you can think of anyway to speed it up, id be very grateful.
thanks for the help
Kenneth Birney
User Interface Programmer
Scottish Police
i use javascript to populate a drop down from an object, problem is, my lists can run to 100's or 1000's of entries. This causes them to populate very slowly. i know from a user interface point of view, this is bad design,but my hands are tied to using drop downs. ill post an example below, if you can think of anyway to speed it up, id be very grateful.
Code:
object (in top frame)
var GunTypedropDownObject = [{ value: "", text: "" },
{ value:"238.003", text:""},
{ value:"237.003", text:"Monicas Test"},
{ value:"235.003", text:"//TEST34"},
{ value:"236.003", text:"//TEST34"},
{ value:"2.003", text:"22 Centrefire Rifle"},
{ value:"81.003", text:"Action (RR)"},
{ value:"82.003", text:"Action Only"},
{ value:"83.003", text:"Adapter"},
{ value:"85.003", text:"Air Pistol(CO2)"},
]
function
function fillGunTypeSelect() {
var select = document.getElementById( 'GunType' );
var options = select.options;
If(options.length == 1)
{
options.length = 0;
var gtdo=top.headerFrame.GunTypedropDownObject;
for(var gi=0;gi<gtdo.length-1;gi++)
{
onegtdo=gtdo[gi];
options[options.length] = new Option(onegtdo.text, onegtdo.value);
}
}
else
{
}
}
thanks for the help
Kenneth Birney
User Interface Programmer
Scottish Police