Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Installation

Add a iframe to your page:

<iframe id="infoland" src="https://static.ambita.com/infoland-mflex/iframe.html"></iframe>

Then load the script to initialise the iframe

<script src="https://static.ambita.com/infoland-mflex/js/index.js"></script>

Usage

Add the script tag to head and use the library after the dom is ready

<!DOCTYPE html>
<html>
<head>
  <title>Page Title</title>
  <script src="https://static.ambita.com/infoland-mflex/js/index.js"></script>
</head>
<body>
  <iframe id="infoland" src="https://static.ambita.com/infoland-mflex/iframe.html"></iframe>
  <button id="button" click>Open Infoland</button>
  <script type="text/javascript">
    (() => {
      Infoland.Mflex.init({
        ...
      });
      
      const button = document.getElementById("button");
      
      button.addEventListener('click', (e) => {
        Infoland.Mflex.load({
          ...
        });
      });
    })();
  </script>
</body>
</html>

See Usage for more information about how to use the init and load functions.

  • No labels