8.1.6 JavaScript Samples
(Session and folder ID are fictitious)
<html>
<head>
<script language="javascript" src="http://test.thruinc.net/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
//sample with ThruFileFilter
$(function(){
var session = '289BEE79-F1B6-4DDE-9A6B-DB5461780FCA';
var url = "https://test.thruinc.net/ExternalJavaUpload.aspx?";
url += "ThruFolderID=" + "1026";
url += "&ThruSessionID=" + session;
url += "&ThruSuccessUrl=" + escape("http://someserver/ExtUpload/success.html");
url += "&ThruErrorReportingUrl=" + escape("http://someserver/ExtUpload/error.html");
url += "&ThruFileFilter=" + "Zip files (*.zip, *.7z, *.tar): zip, 7z, tar";
$("#f").attr("src", url);
});
</script>
</head>
<body>
<iframe id="f" width="800px" height="800px" src=""></iframe>
</body>
</html>
<html>
<head>
<script language="javascript" src="http://test.thruinc.net/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
//sample with ThruFileFilterExceptions
$(function(){
var session = '289BEE79-F1B6-4DDE-9A6B-DB5461780FCA';
var url = "https://test.thruinc.net/ExternalJavaUpload.aspx?";
url += "ThruFolderID=" + "1026";
url += "&ThruSessionID=" + session;
url += "&ThruSuccessUrl=" + escape("http://someserver/ExtUpload/success.html");
url += "&ThruErrorReportingUrl=" + escape("http://someserver/ExtUpload/error.html");
url += "& ThruFileFilterExceptions=" + "exe,msi,mp3";
$("#f").attr("src", url);
});
</script>
</head>
<body>
<iframe id="f" width="800px" height="800px" src=""></iframe>
</body>
</html>
<html>
<head>
<script language="javascript" src="http://triton.actimind.com/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
//sample with security token
$(function(){
var session = '289BEE79-F1B6-4DDE-9A6B-DB5461780FCA';
var url = "https:// test.thruinc.net/ExternalJavaUpload?";
url += "ThruFolderID=" + " hLmrvNNh7rMjT/fLL27vyQDPXUl/UjBKKwurzLAxmopIxotP/T20Mz5J180jhG3Soqkz8bB1AV6rz3NMcyYtmm3mdo+CLeD0FDfgJZ6cw1Iqs9V+R79KsJ1mzfUKGrgQmrOq1NlosLcBtzmoVPW4+Cqkt+bkNBdYoYw8DITFkHd/VsEHCnk5pjPd89mDATyjTu4xMCXFVH20lP7tTOU75k61LLSj3X6bHzCuorKcUzp7nuvxve0se9cOdFQ3TA6XH78IMGmdoOz9JgDPITyz1Q==";
url += "&ThruSuccessUrl=" + escape("http://someserver/ExtUpload/success.html");
url += "&ThruErrorReportingUrl=" + escape("http://someserver/ExtUpload/error.html");
url += "&ThruFileFilter=" + "Zip files (*.zip, *.7z, *.tar): zip, 7z, tar";
url += "&ThruApplicationID=" + "1";
$("#f").attr("src", url);
});
</script>
</head>
<body>
<iframe id="f" width="800px" height="800px" src=""></iframe>
</body>
</html>