W
William
I tried to update a scrolling_list with the following:
function saveText( scroll_list, t_area, listToBeUpdated ) {
var updated = new Option();
updated.value = t_area.value;
updated.text = t_area.text;
scroll_list.options[scroll_list.selectedIndex] = updated;
}
but I get "Undefined" in the position with the new Option()
(i.e. "updated").
Why and how to fix this?
function saveText( scroll_list, t_area, listToBeUpdated ) {
var updated = new Option();
updated.value = t_area.value;
updated.text = t_area.text;
scroll_list.options[scroll_list.selectedIndex] = updated;
}
but I get "Undefined" in the position with the new Option()
(i.e. "updated").
Why and how to fix this?