API Home       Error Codes       Your API Keys
Back to JavaScript

imageloop API - JavaScript Demo 1





HTTP Session ID

this.nextSibling.innerHTML = il.getSessionId();
HTTP Session ID
(asynchronous/own handler)


il.getSessionIdAsync( function(response) {
   document.getElementById('sid').innerHTML = response.httpSessionID;
});
HTTP Session ID
(asynchronous/HTML target)


il.getSessionIdAsync(
   il.createHtmlTargetHandler('sidh','httpSessionID')
   );
Login Username:
Password:


try {
    el.innerHTML = il.login(user,pass);
}
catch (x) {
    el.innerHTML = x;
}
Current User

this.nextSibling.innerHTML = il.getCurrentUserName();
Error handling test

try { il.errorTest(); } catch (x) { this.nextSibling.innerHTML = x; }
My looops


var looops = il.getMyLooopsEx();
var l = looops.length;
for (var n=0; n<l; n++) {
    var looop = looops[n];
    var name = looop.getName();
    var descriptiveName = looop.getDescriptiveName();
}
Rendition Names


var renditions = il.getAvailableRenditions();
var l = renditions.length;
for (var n=0; n<l; n++) {
    var rendName = renditions[n];
}