Hi, you can use
window.scrollTo(0,document.body.scrollHeight);
in javascript action past this code and call it in onclick event uisng nanoflow.
And there is a widget for that: https://appstore.home.mendix.com/link/app/2583/Mendix/Scroll-To-Anchor
Good one in combination with this one: https://appstore.home.mendix.com/link/app/1046/Mendix/Scroll-To-Top-Button
Regards,
Ronald
I added a widget called DojoXScroll to the AppStore yesterday. Reasoning behind yet another widget for scrolling next to the already mentioned ones is that all other widgets were a bit outdated, I could not get them to work directly and they are loading jQuery, which I want to refrain from.
This widget loads an extra dojox library Mendix is not loading itself by default. This extension of dojo has a function called smoothScroll which can handle nice scrolling behavior. So, what you could do is add that widget, then the library becomes available to use in your application.
After that, add some JavaScipt in an HTML snippet, something like shown in this JSFiddle:
http://jsfiddle.net/kfranqueiro/6aNrp/
The trickiest part is ensuring you are targeting the correct node and win parameters. After that, you will experience some smooth automatic scrolling ;)
If you need to scroll on the same page it would suffice that you add an elemnt with unique id at the bottom of the page and then link to this elements id. For example, to scroll to the bottom of this page you can use
https://forum.mendix.com/link/questions/88267#mxui_widget_DataView_1
Try the HTMLSnippet widget with some javascript/jQuery, like (untested):
$('.classOfLink').on('click', function() {
$("html, body").animate({ scrollTop: $(document).height() }, 1000);
});
Javascript is very powerfull. But use Mendix whenever possible to create better maintainable apps. So here is the implemention of Andrej’ example: