Go to page top after Create/Save anything in Version 1.2.19

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
bben78
Posts: 3
Joined: Mon Mar 07, 2022 6:55 am

Go to page top after Create/Save anything in Version 1.2.19

Post by bben78 »

As i used to have the behavior in v0.8.8f, is there any simple solution to modify code in v1.2.19 that the page scrolls up to top, after anything is created or saved ?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Go to page top after Create/Save anything in Version 1.2.19

Post by netniV »

You would need a modification to the loadPage functions so that they set the location to be back to the top.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
bben78
Posts: 3
Joined: Mon Mar 07, 2022 6:55 am

Re: Go to page top after Create/Save anything in Version 1.2.19

Post by bben78 »

netniV wrote: Mon Apr 11, 2022 8:07 pm You would need a modification to the loadPage functions so that they set the location to be back to the top.
Thank you for the hint. Do you mean the function loadPage in ./include/layout.js ? There is following code:


applySkin();

if (isMobile.any() != null) {
window.scrollTo(0,1);
} else {
window.scrollTo(0,0);
}

handleConsole(pageName);

I guess window.scrollTo should do this, but as I am not really a programmer, i would not know, where to modify in the function loadPage
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests