This commit is contained in:
mattbk 2023-09-16 19:17:31 -05:00
parent c48c624f71
commit 269cbfdd22

View File

@ -186,9 +186,7 @@ const char index_html[] PROGMEM = R"rawliteral(
<script type="text/javascript">
// Show more stuff depending on selected values
// https://stackoverflow.com/a/24849350
document
.getElementById('message')
.addEventListener('change', function () {
show_message = function () {
'use strict';
var vis_message = document.querySelector('.vis_message'),
target = document.getElementById("message"+this.value);
@ -198,10 +196,8 @@ const char index_html[] PROGMEM = R"rawliteral(
if (target !== null ) {
target.className = 'vis_message';
}
});
document
.getElementById('send-program')
.addEventListener('change', function () {
}
show_program = function () {
'use strict';
var vis_program = document.querySelector('.vis_program'),
target = document.getElementById("program"+this.value);
@ -211,7 +207,13 @@ const char index_html[] PROGMEM = R"rawliteral(
if (target !== null ) {
target.className = 'vis_program';
}
});
}
document
.getElementById('message')
.addEventListener('change', show_message);
document
.getElementById('send-program')
.addEventListener('change', show_program);
</script>
</body></html>)rawliteral";