Show loading symbol in suitelet page.

The loading symbol image should be added in file cabinet in NetSuite. By using the url we can get the loading symbol in client script.

showLoadingSymbol() {

        try {

          let imageFileURL = “https://6714807-sb1.app.netsuite.com/core/media/media.nl?id=13826&c=6714807_SB1&h=i6sFVHQSShJjCkXTmJwHkwM5dThim043wsoW-3m16qCiK5QF”;

          let loadingDiv = document.createElement(“div”);

          loadingDiv.id = “loading-symbol”;

          loadingDiv.style.position = “fixed”;

          loadingDiv.style.top = “50%”;

          loadingDiv.style.left = “50%”;

          loadingDiv.style.transform = “translate(-50%, -50%)”;

          let loadingImage = document.createElement(“img”);

          loadingImage.src = imageFileURL;

          loadingImage.alt = “Loading…”;

          loadingImage.style.width = “75px”;

          loadingImage.style.height = “75px”;

          loadingDiv.appendChild(loadingImage);

          document.body.appendChild(loadingDiv);

          console.log(“document.body”, document.body)

        } catch (e) {

          console.error(“error @ showLoadingSymbol”, e);

        }

      },

Leave a comment

Your email address will not be published. Required fields are marked *