Closed arimukhlas closed 10 months ago
hi @cotestatnt
I want to add 2 custom addOptionBox,
I try this on sketch,
myWebServer.addOptionBox("Summary Result"); myWebServer.addHTML(custom_html1, "fetch-test", /*overwite*/ true); myWebServer.addCSS(custom_css, /*overwite*/ false); myWebServer.addJavascript(custom_script, /*overwite*/ false); myWebServer.addOptionBox("About Me"); myWebServer.addHTML(custom_html2, "fetch-test", /*overwite*/ true); myWebServer.addCSS(custom_css, /*overwite*/ false); myWebServer.addJavascript(custom_script, /*overwite*/ false);
and this on customelement.h
static const char custom_html1[] PROGMEM = R"EOF( <main class="container"> <article class="grid"> <div> <p id="esp1">T E S T 1</p> </div> </article> </main> )EOF"; static const char custom_html2[] PROGMEM = R"EOF( <main class="container"> <article class="grid"> <div> <p id="esp2">T E S T 2</p> </div> </article> </main> )EOF";
but the page is only show on last option box Is possible to add more than one custom_html on different optionBox?
thanks
You need to set 2 different id for ech section
myWebServer.addHTML(custom_html1, "fetch-test1", /*overwite*/ true); myWebServer.addHTML(custom_html1, "fetch-test2", /*overwite*/ true);
hi @cotestatnt
I want to add 2 custom addOptionBox,
I try this on sketch,
and this on customelement.h
but the page is only show on last option box Is possible to add more than one custom_html on different optionBox?
thanks