When I try to use both of these scripts (inline and external) together, only the second one seems to be working while the first one does not.
The first script (inline) is responsible for submitting the form and loading the list:
<select id="my-select" name="show_user_todo" onchange="document.form_buttons.submit()">
Meanwhile, the second script is used to set the color of the select
based on the selected option:
<script type="text/javascript">
var mySelect = document.getElementById('my-select');
var setBgColor = function (select) {
select.style.color = select.options[select.selectedIndex].style.color;
};
mySelect.onchange = function () {
setBgColor(this);
};
</script>