61 lines
1.6 KiB
HTML
61 lines
1.6 KiB
HTML
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<link rel="stylesheet" href="../innorix.css">
|
|
<script src="../innorix.js"></script>
|
|
<script>
|
|
var control1 = new Object();
|
|
var urlBase = location.href.substring(0, location.href.lastIndexOf("/") + 1);
|
|
|
|
window.onload = function () {
|
|
// 파일전송 컨트롤 생성
|
|
control1 = innorix.create({
|
|
el: '#fileControl1', // 컨트롤 출력 HTML 객체 ID
|
|
transferMode: 'upload' // 전송모드
|
|
});
|
|
}
|
|
|
|
|
|
function download() {
|
|
control1.destroy(); // 컨트롤 객체 destroy
|
|
// 파일전송 컨트롤 생성
|
|
control2 = innorix.create({
|
|
el: '#fileControl2' // 컨트롤 출력 HTML 객체 ID
|
|
, enableDropZone: false
|
|
, transferMode: 'download' // 전송모드
|
|
, agent: false // true = Agent 설치, false = html5 모드 사용
|
|
});
|
|
document.getElementById('fileControl1').style.display = 'none';
|
|
|
|
control2.on('loadComplete', function (p) { // 다운로드 파일 추가
|
|
control2.presetDownloadFiles(
|
|
[{
|
|
printFileName: "INNORIX WP 브로셔.pdf",
|
|
fileSize: 1433885,
|
|
downloadUrl: urlBase + "download.jsp?fileID=1"
|
|
},
|
|
{
|
|
printFileName: "INNORIX WP Brochure.pdf",
|
|
fileSize: 1433885,
|
|
downloadUrl: urlBase + "download.jsp?fileID=2"
|
|
},
|
|
{
|
|
printFileName: "INNORIX WP パンフレット.pdf",
|
|
fileSize: 1433885,
|
|
downloadUrl: urlBase + "download.jsp?fileID=3"
|
|
}]);
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="fileControl1"></div>
|
|
<div id="fileControl2"></div>
|
|
|
|
<input type="button" value="다운로드모드" onclick="download();" />
|
|
</body>
|
|
|
|
</html> |