API call alert

Other

by Flexmonster Pivot Table

HTML

<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<button onclick="showAlert()">Show alert pop-up</button>

<div id="pivot-container"></div>

CSS

@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);

JavaScript

let pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  report: {
    dataSource: {
      filename: "data/data.csv"
    }
  }
});

function showAlert() {
  pivot.alert({
    title: "Error Title",
    message: "An error message",
    type: "error",
    buttons: [{
      label: "Button 1",
      handler: () => {
        alert("Button 1 handler");
      }
    }, {
      label: "Button 2",
      handler: () => {
        alert("Button 2 handler");
      }
    }],
    blocking: false
  });
}