Show Loading Message On Page Navigation
Introduction
When users click on links or buttons that navigate away from the current page, a loading... message overlay shows up, which can improve their experience. This feature confirms that their action has been registered and helps prevent duplicate clicks.
How does it work?
By adding custom CSS, JavaScript, and HTML to your Joget application, you can create a loading overlay that appears whenever a link or button is clicked or a form is submitted. The overlay displays a message that disappears once the new page begins to load.
- CSS: The CSS code defines the style of the overlay, including its position, size, background, and animation.
- JavaScript: The JavaScript code detects clicks on links, buttons, and form submissions. It triggers the loading overlay to appear.
- HTML: The HTML code creates the structure for the loading overlay that will display the message.
Implementation Steps
-
Go to Userview Builder > Settings > Custom CSS and add the following code:
-
Next, go to Userview Builder > Settings > Custom Javascript and add this script:
-
Finally, add the following HTML code to Userview Builder > Settings > Sub Header:
Expected outcome
Once you complete the steps, the loading overlay with a loading... message will appear whenever users click links, buttons, or submit forms. The overlay will disappear as the new page loads, giving users visual feedback that their action has been registered.