diff --git a/docs/api.html b/docs/api.html
index 1023246..24808b0 100644
--- a/docs/api.html
+++ b/docs/api.html
@@ -1287,14 +1287,14 @@ Register the handler function for undefined URL request detected.
AutoConenctAux& where(void)
+
-Returns a pointer to the AutoConnectAux object of the custom Web page that caused the request to the page.
+Returns an uri string of the AutoConnectAux uri object of the custom Web page that caused the request to the page.
AutoConnect identifies the URI (ie. the referrer URI) that caused the request each time from the client occurs and will save the URI If the request source is a custom Web page of AutoConnectAux. The where function returns a pointer of AutoConnectAux which is a URI of a least recent request from the custom Web page.
This function is provided to access the fields (ie. the AutoConnectElements) with a custom Web page handler of a page and is available only for request source that is the custom Web pages. It is invalid for HTTP requests from individual pages registered with the on handler of ESP8266WebServer/WebServer for ESP32. In other words, this function only returns the AutoConnecAux page which is a least recently displayed.
- Return value
- - A pointer to the AutoConnectAux that caused the request the page.
+ - An uri string of the AutoConnectAux that caused the request the page.
The where function usage is described in the section Where to pick up the values.
diff --git a/examples/mqttRSSI/mqttRSSI.ino b/examples/mqttRSSI/mqttRSSI.ino
index df83583..61e115d 100644
--- a/examples/mqttRSSI/mqttRSSI.ino
+++ b/examples/mqttRSSI/mqttRSSI.ino
@@ -275,7 +275,7 @@ String loadParams(AutoConnectAux& aux, PageArgument& args) {
String saveParams(AutoConnectAux& aux, PageArgument& args) {
// The 'where()' function returns the AutoConnectAux that caused
// the transition to this page.
- AutoConnectAux& mqtt_setting = portal.where();
+ AutoConnectAux& mqtt_setting = portal.aux(portal.where());
getParams(mqtt_setting);
AutoConnectInput& mqttserver = mqtt_setting["mqttserver"].as
();
diff --git a/examples/mqttRSSI_NA/mqttRSSI_NA.ino b/examples/mqttRSSI_NA/mqttRSSI_NA.ino
index 9bda302..2c0dd2c 100644
--- a/examples/mqttRSSI_NA/mqttRSSI_NA.ino
+++ b/examples/mqttRSSI_NA/mqttRSSI_NA.ino
@@ -147,8 +147,6 @@ int getStrength(uint8_t points) {
// Retreive the value of each element entered by '/mqtt_setting'.
String saveParams(AutoConnectAux& aux, PageArgument& args) {
- // The 'where()' function returns the AutoConnectAux that caused
- // the transition to this page.
mqttserver.value.trim();
channelid.value.trim();
userkey.value.trim();
diff --git a/mkdocs/api.md b/mkdocs/api.md
index 5052286..25cc57d 100644
--- a/mkdocs/api.md
+++ b/mkdocs/api.md
@@ -296,14 +296,14 @@ Register the handler function for undefined URL request detected.
### where
```cpp
-AutoConenctAux& where(void)
+String where(void)
```
-Returns a pointer to the AutoConnectAux object of the custom Web page that caused the request to the page.
+Returns an uri string of the AutoConnectAux uri object of the custom Web page that caused the request to the page.
AutoConnect identifies the URI (ie. the referrer URI) that caused the request each time from the client occurs and will save the URI If the request source is a custom Web page of AutoConnectAux. The **where** function returns a pointer of AutoConnectAux which is a URI of a least recent request from the custom Web page.
This function is provided to access the fields (ie. the AutoConnectElements) with a custom Web page handler of a page and is available only for request source that is the custom Web pages. It is invalid for HTTP requests from individual pages registered with the **on** handler of ESP8266WebServer/WebServer for ESP32. In other words, this function only returns the AutoConnecAux page which is a least recently displayed.
- **Return value**
- - A pointer to the AutoConnectAux that caused the request the page.
+ - An uri string of the AutoConnectAux that caused the request the page.
The **where** function usage is described in the section [*Where to pick up the values*](achandling.md#where-to-pick-up-the-values).
diff --git a/src/AutoConnect.h b/src/AutoConnect.h
index 8519342..b1e98b4 100644
--- a/src/AutoConnect.h
+++ b/src/AutoConnect.h
@@ -185,7 +185,7 @@ class AutoConnect {
void join(AutoConnectAux& aux);
void join(AutoConnectAuxVT auxVector);
bool on(const String& uri, const AuxHandlerFunctionT handler, AutoConnectExitOrder_t order = AC_EXIT_AHEAD);
- AutoConnectAux& where(void) const { return *aux(_auxUri); }
+ String where(void) const { return _auxUri; }
/** For AutoConnectAux described in JSON */
#ifdef AUTOCONNECT_USE_JSON