-
Notifications
You must be signed in to change notification settings - Fork 2
Using in HTML page
Joel Latino edited this page Jul 16, 2013
·
4 revisions
You just need include cda.js to use the CDAjs library. I advise using minifier to have a faster loading.
<script type="text/javascript" src="../lib/min/cda-min.js"></script>
<script type="text/javascript">
var obj = new CDA({
url: "http://localhost:8080/pentaho/content/cda/",
username: "joe",
password: "password",
error: function(error) {
console.log("Error: " + error);
return;
}
});
obj.doQuery(function(xhr) {
document.getElementById("data").innerHTML=("Result Set: " + xhr.resultset);
}, {
params: {
dataAccessId: 1,
outputIndexId: 1,
pageSize: 0,
pageStart: 0,
path: "%2Fplugin-samples%2Fcda%2Fcdafiles%2Fscripting.cda",
sortBy: ""
}
});
</script>
You can find a example here.