firmware wip - add JSreplaceStr
This commit is contained in:
parent
819f3f3750
commit
c7b3bc2d2f
1 changed files with 7 additions and 2 deletions
|
@ -157,6 +157,7 @@ const char HTMLheader[] PROGMEM = R"EOF(
|
||||||
<li><a id="systemSettings" href="/systemSettings">System settings</a></li>
|
<li><a id="systemSettings" href="/systemSettings">System settings</a></li>
|
||||||
<li><a href="/wifiSettings">WiFi settings</a></li>
|
<li><a href="/wifiSettings">WiFi settings</a></li>
|
||||||
<li><a href="/help">Help</a></li>
|
<li><a href="/help">Help</a></li>
|
||||||
|
<li><span id="GrowName"></span></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
|
|
||||||
|
@ -232,7 +233,7 @@ a:active {
|
||||||
border-bottom-left-radius: 3px;
|
border-bottom-left-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav li a {
|
.nav li a , .nav span {
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
display: block;
|
display: block;
|
||||||
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
|
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
|
||||||
|
@ -911,6 +912,7 @@ void WEBlogout() {
|
||||||
void WEBhelp() {
|
void WEBhelp() {
|
||||||
String body = FPSTR(HTMLheader);
|
String body = FPSTR(HTMLheader);
|
||||||
body += FPSTR(HTMLhelp);
|
body += FPSTR(HTMLhelp);
|
||||||
|
body += JSreplaceStr("GrowName", "abcdefgh");
|
||||||
body += FPSTR(HTMLfooter);
|
body += FPSTR(HTMLfooter);
|
||||||
webserver.send(200, "text/html", body);
|
webserver.send(200, "text/html", body);
|
||||||
}
|
}
|
||||||
|
@ -1067,7 +1069,10 @@ void POSTwifiSettings() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String JSreplaceStr(String elementID, String content) {
|
||||||
|
String jsReturn = "<script>document.getElementById('" + elementID + "').innerHTML='" + content + "';</script>";
|
||||||
|
return jsReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue