Copy link to clipboard
Copied
Hi There!
Look at this page:
http://martinique.org/martiniquenew/discovery/towns-villages.php
Use the Navigator bar to page through and you'll notice a very annoying thing - the page jumps to the top.
How can we prevent that to happen so we stay at the same level of the page when we navigate through the database?
Thank you much for your answers.
Using the recordset navigation bar reloads the page, so it naturally goes to the top. To get the page to reload at a particular place within the page, you need to add an ID to the element you want to navigate to, and add it at the end of the URL preceded by a hash sign.
The following example shows the ID mainDiv added to the end of the Next code from a recordset navigation bar:
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $
...Copy link to clipboard
Copied
Using the recordset navigation bar reloads the page, so it naturally goes to the top. To get the page to reload at a particular place within the page, you need to add an ID to the element you want to navigate to, and add it at the end of the URL preceded by a hash sign.
The following example shows the ID mainDiv added to the end of the Next code from a recordset navigation bar:
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>#mainDiv">Next</a>
Copy link to clipboard
Copied
Thank you very much David!
As usual you're right on target. (I made up this expression, I hope it make sense);-)
Just so you know, your books are THE Bible of web design/development for me.
I'm fortunate I met you through the books you wrote and I made so much progress since I got them.
I'm sure you have students coming from everywhere in the world.
Well, I'm one of your Senegalese student.
Thank you very much again!
Copy link to clipboard
Copied
Glad to have been of help. Thanks for your kind words about my books.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more