js set input selection code example
Example 1: javascript set input field value
document.getElementById("myInputID").value = "My Value"; //set value on myInputID
Example 2: javascript set select option
document.getElementById("mySelectID").value="my_value";
//note: setting value in html directly does not work <select value="my_value">