Skip to content

hideloader() - Merciglobal Cloud ERP JS Function

Overview

The hideloader() function is a utility JavaScript function within the Merciglobal Cloud ERP front-end ecosystem. It is specifically used to remove or hide the loading overlay (loader) that is typically shown during data processing, form submission, or any asynchronous operation. Once the loader is hidden, user interaction with the screen is re-enabled.


Purpose

  • Enhance user experience by clearly indicating the end of a processing task.
  • Re-enable the screen after background operations are completed.
  • Improve UI responsiveness within the ERP interface.

Function Definition

function hideloader() {
    // Hide loader overlay
    document.getElementById("loaderWrapper").style.display = "none";

    // Enable screen interactions
    document.body.style.pointerEvents = "auto";
    document.body.style.opacity = 1;
}

Use Cases

  • ✅ After submitting a form and receiving a server response.
  • ✅ After loading data via AJAX or fetch.
  • ✅ When navigating between modules inside the ERP interface.

Prerequisites

Before calling hideloader(), ensure that: - The loader was previously displayed using a corresponding showloader() or similar function. - The loader element (#loaderWrapper) exists in the DOM.


Example

// Example usage after AJAX call
fetch('/api/update-data')
  .then(response => response.json())
  .then(data => {
    console.log('Data updated successfully');
    hideloader();
  });

Internal Notes for Merci Developers

  • Make sure to avoid multiple hideloader() calls; it should be invoked only after confirming operation completion.
  • Ensure #loaderWrapper is globally accessible across modules.

For any issues or suggestions, please contact the front-end core team or raise a ticket via the internal portal.


Merciglobal Cloud ERP – Streamlining UI interactions one loader at a time!