Hello, please help. How do you enable a button when the user has scrolled to the end of the page on the mobile? The answer in this link does not work for me
Hi @Matanong ,
Could you please share your OML file so I can review it and provide feedback?
Thanks,
Vipin Yadav
Hello, this is the oml. I am using mobile, btw. Thank you.
you can compare total record count and list current count and if both are equal then you can add condition to the button
Hi matanong,
you can use the lists OnScrollEnding action to enable disable the
hope it helps,
It is not possible in my use case since I am using a ck editor, and is being loaded into a container
Hi @Matanong ,Please refer this Page this will helps you how-to-enable-a-button-in-a-popup-when-you-reached-the-bottom
Still not working. If anyone has an idea, feel free to chip in. Thank you.
Hi @Matanong
Can you try below steps:
var container = document.getElementById("EditorContainer");
if (container) {
container.addEventListener("scroll", function () {
if (container.scrollTop + container.clientHeight >= container.scrollHeight) {
// Send message to OutSystems to enable the button
$public.FeedbackMessage.sendMessage("EnableButton");
}
});
Handle this message in OutSystems.
4. On the screen, add an OnMessage handler with logic:
If Message = "EnableButton", Assign IsButtonEnabled = True, which was false at the start.
5. This will make the button clickable once the user reaches the bottom.
Hi @Matanong,
You can achieve this using the Intersection Observer API, which is much more reliable than manually checking scroll positions, especially on mobile devices.
Here’s a simple example in JavaScript that you can use in OutSystems to enable a button when the user scrolls to the end of the page:
const sentinel = document.getElementById($parameters.SentinelId);
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
// Trigger even if the sentinel is partially visible
if (entry.isIntersecting || entry.intersectionRatio > 0) {
$actions.EnableButton();
observer.unobserve(sentinel); // Stop observing after the first trigger
}, { root: null, threshold: 0.1 });
observer.observe(sentinel);
$parameters.SentinelId is the ID of an invisible element placed at the end of your page.
$actions.EnableButton() is a Client Action you create in OutSystems to enable the button.
Using threshold: 0.1 ensures the action triggers even if the sentinel is only partially visible, which is more reliable on mobile.
I will also attach an OML example so you can see it working directly in OutSystems.
This approach avoids manual scroll calculations and works smoothly across devices.
Hi, you can use js and achieve the concept you are trying