html_js_confpages.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. static const char html_js_confpages_start[] PROGMEM = R"=====(
  2. <script>
  3. function g(i) { return document.getElementById(i) };
  4. function sp(i){g(i).type=(g(i).type==='text'?'password':'text');}
  5. var xhttp, reqTime, reqFin;
  6. function selectElement(el, val) {
  7. if(el !== null) {
  8. el.value = val;
  9. }
  10. }
  11. function setCbx(el, da) {
  12. if(el !== null) {
  13. if(da == '1') {
  14. el.checked = true;
  15. el.style.visibility = 'visible';
  16. }
  17. else {
  18. el.checked = false;
  19. el.style.visibility = 'visible';
  20. }
  21. }
  22. }
  23. function updCbxVal(el) {
  24. if(el !== null) {
  25. if (el.checked) el.value = '1';
  26. else {
  27. el.checked = true;
  28. el.value = '0';
  29. el.style.visibility = 'hidden';
  30. }
  31. }
  32. }
  33. )====="; // html_confweb_script
  34. static const char html_js_confpages_end[] PROGMEM = R"=====(
  35. function init() {
  36. transmit();
  37. }
  38. setInterval(function () { ++reqTime; }, 1000);
  39. </script>
  40. )====="; // html_confweb_script