Stupid Webserver Quesiton

I have been using a highly modified and extended version of the Arduino WebServer example for some time. But I'd now like to do something that I'm not sure is allowed. The web I/F provides one of many user interfaces to my application, but I'd like to have the system send a page of error data whenever something goes wrong. How can I do that? Does it require the client to periodically "poll" for errors by doing a refresh, or is there some means by which I can send a page of HTML without first receiving a client request?

Regards,
Ray l.

The client would have to poll the server. Have you considered sending a text message or email instead?

SurferTim:
The client would have to poll the server. Have you considered sending a text message or email instead?

It's part of an interactive UI. text or e-mail would be completely out of place. My main form is a tab control, so what I'd like is for it to induce a tab switch when an error occurs. But I don't want the form actually refreshing periodically due to the polling, so I can't just do periodic refreshes.

I'm sure there's a way to do it with javascript, Ajax or one of the bazillions of other web tools. I just don't yet know how. Web programming just ain't my thing.

Regards,
Ray L.

The client must contact the server. In most cases, the server can't contact the client due to the client being behind a router's firewall on a localnet IP.

If you are sure there is a way for the server to contact the client, you are a step ahead of me.

Personally, I would use a frame on the web page and update just the frame from the client, but that is just me. edit: And I would do it with JavaScript or Ajax, but running on the client side.

SurferTim:
The client must contact the server. In most cases, the server can't contact the client due to the client being behind a router's firewall on a localnet IP.

If you are sure there is a way for the server to contact the client, you are a step ahead of me.

Personally, I would use a frame on the web page and update just the frame from the client, but that is just me. edit: And I would do it with JavaScript or Ajax, but running on the client side.

Ajax will definitely do what I need, by making periodic requests from the server that check a status value, but don't alter the displayed page. When an error occurs the status request will return a value that causes the client to request a different page, and that page displays the error. Just need to work out the details, but doesn't look terribly complicated....

Regards,
Ray L.

Yes, and this is done from the client side. That is doable.