btidey wrote:If you want two different on calls to do different things then you need to define them as two different methods, e.g. handleRoot and handleRootExt.
If they behave similarly such that you want to make much of the code common then define the common code as say handleRootBase with a parameter to modify its behaviour. Then call handleRootBase from handleRoot and handleRootExt with that parameter.
Thank you for your feedback, and yes, that would be my simplest think to do, but the HTML code is way to big to make a copy of it and to edit/update something in it after would be really hard.
The code / source is the same except at the end, the send command is different as I posted above:
if (blIsExtAccess == false)
{
server.send(200, "text/html", stData);
} else {
serverExt.send(200, "text/html", stData);
}
}
So, as you see, I'm sending the same data "stData" to both server command, but with boolean "blIsExtAccess" switch...
That was my intention.
Kind regards,
Viktor