My ESP32 is setup as a WIFI server. The server creates a list of hyperlinks on the CLIENT side.
When a hyperlink is selected the server goes to that page.
How can the server query the client to know which page it is on?
I don't know what you need it for, but I assume that with JavaScript you can handle anything on your client side.
Need to handle it on the server side.
When the hyperlink is selected on the client side the server needs to know what subpage it is on so that the server can send back the appropriate information to be displayed on that selected page.
i.e. 192.168.1.100/1 or /2 or /3 etc.
Sounds similar to:
javascript - Sending Data Between ESP32 Client and Server - Stack Overflow
add a class attribute to all your tags in the html page like this <a class = "page-tracker"></a>
.
In your JavaScript you need to add any type of event listener so that when the page hyperlink is pressed, it sends a request to the server with the appropriate information of the page the client is on.
"tags in the html page like this" link didn't work
no code posted hard to tell..
kind of thinking you just want to have more than one page served by your server..
have you played with..
Sorry, bad formatting of the post
Thanks, I'll try the class idea and see if it works
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.