HTML executar comando

Good morning everyone
I have the program working, but every time I click the button it opens a window. Is it possible to run the link without having to open / change pages?

Bom dia a todos
Eu tenho o programa a funcionar, só que cada vez que clico no botão abre uma aba/janela. A questão é possível executar o link sem que seja preciso abrir/mudar de pagina?

#include <ESP8266WiFi.h>
const char* ssid = “RedeCasa”;
const char* password = “RedeCasa5533”;
IPAddress ip(192,168,0,192);
IPAddress gateway(192,168,0,254);
IPAddress subnet(255,255,255,0);
WiFiServer server(80);
String inString = String(35);

void setup(void) {
// Serial.begin(115200);
// Connect to WiFi network
/* Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid); */

WiFi.begin(ssid, password);
WiFi.config(ip, gateway, subnet);// Ip manual

/* while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println(“WiFi connected”);
Serial.println(WiFi.localIP()); */

// Start the server
server.begin();
// Print the IP address
//Serial.print(WiFi.localIP());
}

void loop(void) {
// Check if a client has connected
WiFiClient client = server.available();
if (client) {
boolean current_line_is_blank = true;
while (client.connected()) {

if (client.available()) {

char c = client.read();

if (inString.length() < 35)
{
inString.concat(c);
}
if (c == ‘\n’ && current_line_is_blank)
{
client.println(“HTTP/1.1 200 OK”);
client.println(“Content-Type: text/html”);
client.println();
/************************** Pagina em HTML ****************/
client.println("");
client.println("");
client.print(“Casa Teste”);
client.println("");
client.println("");

// *************************************************************** Esta correcto
//********************** Estores Cozinha Pequeno
client.print(“

Estoro Cozinha Pequeno <a href=http://192.168.0.198/subir=Subir target=_blank”>Abrir");
client.print(" <a href=http://192.168.0.198/parar=Parar target=_blank">Parar");
client.print(" <a href=http://192.168.0.198/descer=Descer target=_blank">Descer");
// *************************************************************** fim Esta correcto

client.println("<a href="/subir=Subir">ON");

if (inString.indexOf("/subir=Subir") != -1)
{
// Objecti é executar http://192.168.0.198/subir=Subir sem abrir uma aba
}

client.println("");
client.println("");
break;
}
if (c == ‘\n’)
{
// we’re starting a new line
current_line_is_blank = true;
} else if (c != ‘\r’)
{
// we’ve gotten a character on the current line
current_line_is_blank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
inString = “”;
client.stop();
}
}

remove all target=_blank from your code

.

My webserver is 192.168.0.192
IPAddress ip(192,168,0,192);
IPAddress gateway(192,168,0,254);
I remove “target=_blank” but change page for http://192.168.0.198/subir=Subir

Objective is execute http://192.168.0.198/subir=Subir but stay the same page 192.168.0.192

Objective is execute http://192.168.0.198/subir=Subir but stay the same page 192.168.0.192

That does not make sense. Your browser makes a GET request, to 192.168.0.198, containing some data - subir=Subir. It doesn't make sense to talk about executing that. In any case, regardless of what the client (browser) requests, you make the same reply. That does NOT change the page that the browser displays. The address bar shows that the browser made a request, and got a response.

If you want the address bar to show something different, you MUST stop generating the same f**king reply for every request.

kammysammy: My webserver is 192.168.0.192 IPAddress ip(192,168,0,192); IPAddress gateway(192,168,0,254); I remove "target=_blank" but change page for http://192.168.0.198/subir=Subir

Objective is execute http://192.168.0.198/subir=Subir but stay the same page 192.168.0.192

subir=Subir in your URL makes no sense unless you actually have a [u]subdirectory[/u] named subir=Subir (which I am not sure is legal).

.

Thanks for the answers I'm going to change a serial communication, it seems easier.