JSFiddle - React, Tailwind, and code Playground

by Stas_P

HTML

<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
<script src="http://bi.example.com:8080/jriosjapi/client/jrio.js"></script>
<button>Cancel</button>
<div id="reportContainer"></div>

JavaScript

jrio(function(jrioClient) {
var button = $("button");
var report = jrioClient.report({
resource: "/samples/reports/SlowReport",
container: "#reportContainer",
events: {
changeTotalPages : function(){
button.remove();
}
}
});
button.click(function () {
report
.cancel()
.then(function () {
button.remove();
alert("Report Canceled!");
})
.fail(function () {
alert("Can't Cancel Report");
});
});
});