Skip to main content
Skip table of contents

2.7.2.6 JavaScript Samples

(Session and folder IDs are fictitious)

CODE

<html><head>
    <script language="javascript" src="http:// test.thrudownload.com/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
   <script language="javascript" type="text/javascript">
//download by authenticated user with SessionID
        $(function(){
            var session = “dfb039f1-4488-4c96-a2ab-085de3ecf77d”;
            var url = “http://test.thruinc.net/ExternalJavaDownload.aspx?”;            
            url += "&ThruSessionID=" + session;
            url += "ThruFiles=" + "18370, 18366";
            url += "ThruFolders=" + "198";
            url += "&ThruSuccessUrl=" + escape("http://server/ExtDownload/success.html");
            url += "&ThruErrorReportingUrl=" + escape("http://server/ExtDownload/error.html");
            $("#f").attr("src", url);
        });
    </script>
</head>
<body>
    <iframe id="f" width="1px" height="1px" src=""></iframe>
</body>
</html>
<html><head>
    <script language="javascript" src="http:// test.thrudownload.com/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
   <script language="javascript" type="text/javascript">
//download by using security token
        $(function(){
            var session = “dfb039f1-4488-4c96-a2ab-085de3ecf77d”;
            var url = “http://test.thruinc.net/ExternalJavaDownload.aspx?”;            
            url += "ThruFiles=" + "hLmrvNNh7rMjT%2ffLL27vyQDPXUl%2fUjBKKwurzLAxmopIxotP%2fT20Mz5J180jhG3Soqkz8bB1AV6rz3NMcyYtmm3mdo%2bCLeD0FDfgJZ6cw1Iqs9V%2bR79KsJ1mzfUKGrgQmrOq1NlosLcBtzmoVPW4%2bCqkt%2bbkNBdYoYw8DITFkHd%2fVsEHCnk5pjPd89mDATyjTu4xMCXFVH20lP7tTOU75k61LLSj3X6bHzCuorKcUzp7nuvxve0se9cOdFQ3TA6XH78IMGmdoOz9JgDPITyz1Q";
            url += "&ThruSuccessUrl=" + escape("http://server/ExtDownload/success.html");
            url += "&ThruErrorReportingUrl=" + escape("http://server/ExtDownload/error.html");
            $("#f").attr("src", url);
        });
    </script>
</head>
<body>
    <iframe id="f" width="1px" height="1px" src=""></iframe>
</body>
</html>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.