I have a page showing dynamic generation of a SELECT box using
JavaScript. See http://www.softouch.on.ca/dynamic.html.
Using Mozilla et al, choosing an option from both lists will result in
the correct response when 'Show Me' is clicked. But IE only shows the
result from the first SELECT box. Any ideas why / how to fix this?
The function I'm using:
function updateList(what)
{
// This dynamically populates the CurrentPositionPicks select box in
the resume page
// depending on what one was selected in the LevelOne select box.
for (var i=0;i<document.Resume.CurrentPositionPicks.length; i++) //
empty the list
{
document.Resume.CurrentPositionPicks.options.lengt h=0;
}
// LevelOnePicks is the top level select box in the resume form
// CurrentPositionPicks is the dynamically generated select list
var CurrentPositionPicks=document.Resume.CurrentPositi onPicks;
for (var i=0;i<document.Resume.LevelOnePicks.length;i++)
{
if (document.Resume.LevelOnePicks.options[i].selected)
{
var ThisList=eval(TopLevel[i].Name); // get the array name to use
for (var j=0; j < ThisList.length; j++)
{
CurrentPositionPicks.options[j]=new Option;
CurrentPositionPicks.options[j].text=ThisList[j];
}
}
}
}