htmllearner
New member
The following links into an "Arduino" project. I modified the following tutorial.
I am needing to add a second button i.e. changing the toggle switch to a button.
I copied the below part
String processor(const String& var){
//Serial.println(var);
if(var == "SLIDERPLACEHOLDER"){
String buttons ="";
String outputStateValue = outputState();
buttons+= "<h4>Lights <span id=\"outputState\"><span></h4><label class=\"switch\"><input type=\"checkbox\" onchange=\"toggleCheckbox(this)\" id=\"output\" " + outputStateValue + "><span class=\"slider\"></span></label>";
return buttons;
}
And started making changes so that it looks like
if(var == "BUTTONPLACEHOLDER"){
String buttons ="";
String outputStateValue = outputState();
buttons+= "<h4>Patten <span id=\"outputState\"><span></h4><label class=\"button\"><input type=\"button\" id=\"output\" " + outputStateValue + "><span class=\"button\"></span></label>"; //Need to display gCurrentPatternNumber somehow
As you will see, the Pattern button does display correctly
I am guessing that
Thanks
I am needing to add a second button i.e. changing the toggle switch to a button.
I copied the below part
String processor(const String& var){
//Serial.println(var);
if(var == "SLIDERPLACEHOLDER"){
String buttons ="";
String outputStateValue = outputState();
buttons+= "<h4>Lights <span id=\"outputState\"><span></h4><label class=\"switch\"><input type=\"checkbox\" onchange=\"toggleCheckbox(this)\" id=\"output\" " + outputStateValue + "><span class=\"slider\"></span></label>";
return buttons;
}
And started making changes so that it looks like
if(var == "BUTTONPLACEHOLDER"){
String buttons ="";
String outputStateValue = outputState();
buttons+= "<h4>Patten <span id=\"outputState\"><span></h4><label class=\"button\"><input type=\"button\" id=\"output\" " + outputStateValue + "><span class=\"button\"></span></label>"; //Need to display gCurrentPatternNumber somehow
As you will see, the Pattern button does display correctly
I am guessing that
- I have not changed the code correctly
- I need more CSS
- I need an extra script
Thanks