12-11-2014 06:31 AM
var self = this;
var ticket;
var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
// IE
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
var data = "{username:admin,password:admin}";
self.xmlHttpReq.open("POST", "http://blrkec335927d:8080/alfresco/service/api/login", true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'json');
self.xmlHttpReq.setRequestHeader('X-Alfresco-Remote-User', 'admin');
xmlHttpReq.onreadystatechange = function() {//Call a function when the state changes.
alert(xmlHttpReq.status);
if (xmlHttpReq.readyState == 4 && xmlHttpReq.status == 200)
{
var getTicket = JSON.parse(xmlHttpReq.responseText);
ticket = (getTicket.data).ticket;
var url1 = "http://blrkec335927d:8080/alfresco/service/ui/myspaces?f=0&p=%2FCompany%20Home&alf_ticket="+ticket;
var aa='';
document.getElementById('uploaddoc').innerHTML = aa;
}
}
self.xmlHttpReq.send(data);
${label['ALFRESCO_DOCUMENT']}
Above code is used for integration. But while loading iframe again its asking for username and password. Please any one help me.
12-11-2014 08:00 AM
12-15-2014 05:46 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.