![]() |
HJB 8/18/2021 |
Proceed to "miscellaneous" section inside PHPRunner and limit the number
|
D
|
Daviant author 8/18/2021 |
Greetings HJB, thank you very much for your answer. What I want to do, if possible, is that when entering, for example, the list page, the display is adjusted to the size of the pc monitor. and that automatically determines the number of records to display based on the size of the monitor. Always keeping the page number section down at the edge of the monitor. |
![]() |
HJB 8/18/2021 |
Search for "body width" (as seen within the screenshot of the above URL content) and |
M
|
mhango 8/19/2021 |
If you intend to use the dashboard, dont specify the width and height of the dashboard elements. That way, it will automatically resize according to screen size |
D
|
Daviant author 8/19/2021 |
Thank you very much for your answers, but it is not exactly what I need. The alternatives they mention fit the monitor width perfectly, but what I need is to adjust the height (on PC) so that no scrolling occurs. |
![]() |
HJB 8/19/2021 |
Do NOT compare "apples with oranges" here ... PHPRunner is a code generator for so called DYNAMIC WEB PAGES in junction with e.g. MySQL If you have just 10 or 20 products to show on a single page with NO scroll bars at all, I recommend In shortage, for STATIC web pages you can define the page size that way to not see any scroll bar at all. |
A
|
acpan 8/19/2021 |
if avoiding scrolling is important, such as in kiosk app, maybe you can detect the screen resolution after login at JS events, and make a ajax call to php script to update the resolution into user profile table, and subsequently PHP can retrieve at before SQL event and limit the rows to be displayed. JavaScript to detect screen size: read this |
D
|
Daviant author 8/20/2021 |
Thanks acpan for your answer. I will continue investigating the side that you indicate to me. I have managed to solve problems that were impossible for me with your help. I think HJB didn't understand what I want to do. Nor have I compared anything. I am working with PHP, MySQL and SQL Server and the tables do not have 10 or twenty records, they have thousands. But queries can be optimized so that the system responds quickly. Thanks a lot. Google translator |
![]() |
HJB 8/20/2021 |
As registered PHPRunner user since v1.0 in 2001 I'm seeing NO I do NOT have any objections if others want to ride the PHPRunner Just my two little cents on the issue ... |
D
|
Daviant author 8/20/2021 |
Each one has its needs and requirements and each project is different. And not because a certain project requires something is wrong. If a query seems wrong to you, just do not answer and we avoid all problems. For what I'm doing PHPrunner is perfect. |
A
|
acpan 8/20/2021 |
Maybe this can give you some idea. I had implemented below with good result to dynamically "do_something", based on detected user's screen height: Part 1 : Detect User Screen with JS Javascript On Load event at login page, insert this: // Get the total height and width of your screen in pixel: |
A
|
acpan 8/20/2021 |
Part 2: PHP part to display rows per page based on screen height PHPRunner event - AfterTableInit - allows you to set rows per page (pageSize) for the specific table conditionally: AfterTableInit event: // replace <tableName> with your table name Note: $_SESSION["screen_height"] is the session variable you would assign from user profile table at login successful event. More info on AfterTableInit event and setting Page Size |
A
|
acpan 8/21/2021 |
Detecting screen width can also be done too, it's a reliable and good way to tell if user is a mobile device, by obtaining its screen size via JS, and hence possible to save the value into user profile table for PHP to use. Go to this link, then open the chrome console and set the viewing device to mobile, click try it and see the width value changes.
|
D
|
Daviant author 8/21/2021 |
Thank you very much Acpan for your time and patience. With the information you provide me, I should already achieve the results I need. I'm going to do the corresponding tests. (Google translator) |