Copy link to clipboard
Copied
Hi there,
Please check out this page:
http://martinique.org/activities/sports.php
Go to the section "Skiing Surfing"
1 - Use the navigation to go through the records.
2 - Take a look at the URL in the browser window.
Now, please go to the section "Hiking" and repeat 1 & 2.
Note that the URL is appending the new parameters instead of replacing the previous one.
What am I doing wrong here.
Please help me to solve this problem.
Thank you much!
The code generated by the Dreamweaver recordset navigation bar automatically adds any existing variables to the end of the query string. The following code (just above the DOCTYPE) comes from a recordset navigation bar on one of my pages:
...$queryString_listAuthors = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_listAuthors") == false &&
stristr($param, "tota
Copy link to clipboard
Copied
The code generated by the Dreamweaver recordset navigation bar automatically adds any existing variables to the end of the query string. The following code (just above the DOCTYPE) comes from a recordset navigation bar on one of my pages:
$queryString_listAuthors = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_listAuthors") == false &&
stristr($param, "totalRows_listAuthors") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_listAuthors = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_listAuthors = sprintf("&totalRows_listAuthors=%d%s", $totalRows_listAuthors, $queryString_listAuthors);
I haven't tested this, but to eliminate the extra variables in the query string, comment out the whole of the if statement like this:
$queryString_listAuthors = "";
/*
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_listAuthors") == false &&
stristr($param, "totalRows_listAuthors") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_listAuthors = "&" . htmlentities(implode("&", $newParams));
}
}
*/
$queryString_listAuthors = sprintf("&totalRows_listAuthors=%d%s", $totalRows_listAuthors, $queryString_listAuthors);
You will need to do that for each of your recordset navigation bars.
Copy link to clipboard
Copied
It works!
Thank you very much David!
Copy link to clipboard
Copied
Good. I was fairly confident that it would solve your problem, but didn't have the time to run any tests. Thanks for letting me know.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now