Did you forget to close your SELECT tag?
How about you show us runnable code that exhibits the problem.
By the way. I can't find any documentation for Option's contructor. In fact, according to the documentation, nodes should be created using createElement and createTextNode methods. What follows uses the correct methods.
function do_populate_cb(s) { var arr = deserialize_string_list(s); var options = document.doc1.selCourseNm.options; var i; // Remove any options it currently has. options.length = 0; // Add new options. for (i=0; i<arr.length; i++) { var option = document.createElement('OPTION'); option.value = arr[i]; option.innerText = arr[i]; options.add(option); } }
In reply to Re^3: copying perl array to javascript array
by ikegami
in thread copying perl array to javascript array
by Rainmaker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |