04-15-2014 12:49 PM
$.get(url, function(data,status){
if (status.code=="403"){
alert ("Something is wrong");
}
ticket = data.toString().substring(48,95);
window.location.href = "${url.serviceContext}/showContent?name=${docName};
},'html'
);
04-15-2014 11:12 PM
04-21-2014 03:12 AM
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
jQuery.support.cors = true;
var urlTicket = "${url.serviceContext}/api/login?u=${user}&pw=${pass}";
var ticket = "";
$.get(urlTicket, function(data,status){
if (status.code=="403"){
status.code = 403;
status.message = "File not found.";
status.redirect = true;
}
ticket = data.toString().substring(48,95);
window.location.href = "${url.serviceContext}/showContent?name=${docName}&alf_ticket="+ticket;
},'html'
);
</script>
<title>Show file</title>
</head>
<body>
</body>
</html>
04-21-2014 04:14 AM
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
jQuery.support.cors = true;
var urlTicket = "${url.serviceContext}/api/login?u=${user}&pw=${pass}";
var ticket = "";
var request = $.get(urlTicket, function(data,status){
ticket = data.toString().substring(48,95);
window.location.href = "${url.serviceContext}/showContent?name=${docName}&alf_ticket="+ticket;
},'html'
);
request.error(function(jqXHR, textStatus) {
if (textStatus == 'error'){
alert("Error: " + status.code);
status.code = 403;
status.message = "File not found.";
status.redirect = true;
alert("Error: " + status.code);
}
});
</script>
<title>Show file</title>
</head>
<body>
</body>
</html>
status.code = 403;
status.message = "File not found.";
status.redirect = true;
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.