I have the following HTML element:
Annual Leave&l
Why not add a variable for the element's Id and make it a reusable function?
function SelectElement(selectElementId, valueToSelect) { var element = document.getElementById(selectElementId); element.value = valueToSelect; }