Ivan Zugec

Drupal Consultant

JavaScript

If you ever need to change a select box via javascript use the code below.


document.myFormName.mySelectName.options[2] = new Option("label", "value", true);

For more information go here http://www.javascriptkit.com/javatutors/selectcontent.shtml and http://www.javascriptkit.com/jsref/select.shtml#section2

Subscribe to RSS - JavaScript