FileForm.jsp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <%@ page contentType="text/html; charset=utf-8" %>
  2. <%@ page import="kr.co.hsnc.common.util.*"%>
  3. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  4. <%
  5. ctx.init(request, response);
  6. ValueObject params = ctx.getParams();
  7. %>
  8. <SCRIPT language="JavaScript">
  9. //파일열기
  10. function doFileOpen() {
  11. document.FileUpload.AddFile();
  12. }
  13. //저장
  14. function doSave() {
  15. var form1 = document.form1;
  16. var fileUpload = document.FileUpload;
  17. if( !submitUploadRequest("/common/file/File_process.screen", "UPLOAD_FILE", form1, fileUpload) ) {
  18. alert("Now processing. Please wait.");
  19. }
  20. }
  21. //파일추가 취소
  22. function doCancelInsert() {
  23. document.FileUpload.DeleteFile();
  24. parent.doCloseFileForm();
  25. }
  26. //결과 처리
  27. function doResult(resultObj) {
  28. var form1 = document.form1;
  29. var fileUpload = document.FileUpload;
  30. try {
  31. if( resultObj.getRequestEvent() == "UPLOAD_FILE" ) {
  32. if( resultObj.getSuccess() ) {
  33. parent.doCloseFileForm();
  34. fileUpload.DeleteFile();
  35. parent.doSearch();
  36. }
  37. else {
  38. dlgErrorMsg(resultObj);
  39. }
  40. }
  41. }
  42. catch(errorObject) {
  43. showErrorDlg("doResult()", errorObject);
  44. }
  45. finally {
  46. form1.isSubmit = false;
  47. }
  48. }
  49. </SCRIPT>
  50. <FORM name="form1">
  51. <INPUT type="hidden" name="file_gb" value="<%= params.get("file_gb") %>">
  52. <INPUT type="hidden" name="id" value="<%= params.get("id") %>">
  53. <INPUT type="hidden" name="mod_no" value="<%= params.get("mod_no") %>">
  54. </FORM>
  55. <TABLE width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
  56. <TR height="25">
  57. <TD>
  58. <TABLE border="0" cellpadding="0" cellspacing="0" align="right">
  59. <TR>
  60. <TD>
  61. <DIV onclick="doFileOpen()" class="button_style">
  62. <TABLE border="0" cellpadding="0" cellspacing="0">
  63. <TR>
  64. <TD class="button_left1"></TD>
  65. <TD class="button_text1">Select File</TD>
  66. <TD class="button_right"></TD>
  67. </TR>
  68. </TABLE>
  69. </DIV>
  70. </TD>
  71. <TD width="10"></TD>
  72. <TD>
  73. <DIV onclick="doSave()" class="button_style">
  74. <TABLE border="0" cellpadding="0" cellspacing="0">
  75. <TR>
  76. <TD class="button_left1"></TD>
  77. <TD class="button_text1">Send File</TD>
  78. <TD class="button_right"></TD>
  79. </TR>
  80. </TABLE>
  81. </DIV>
  82. </TD>
  83. <TD width="10"></TD>
  84. <TD>
  85. <DIV onclick="doCancelInsert();" class="button_style">
  86. <TABLE border="0" cellpadding="0" cellspacing="0">
  87. <TR>
  88. <TD class="button_left1"></TD>
  89. <TD class="button_text1">Cancel</TD>
  90. <TD class="button_right"></TD>
  91. </TR>
  92. </TABLE>
  93. </DIV>
  94. </TD>
  95. </TR>
  96. </TABLE>
  97. </TD>
  98. </TR>
  99. <TR>
  100. <TD>
  101. <SCRIPT language="JavaScript">
  102. var obj = new UploadObject("FileUpload");
  103. obj.setSize('99%', '99%');
  104. obj.display();
  105. function OnInnoAPLoad(){
  106. //obj.addTempFile("내역서_포멧.xls", 17408, "11");
  107. //obj.addTempFile("인사발령.xls", 22408, "22");
  108. //obj.addTempFile("변경요청서.xls", 332156, "33");
  109. }
  110. </SCRIPT>
  111. </TD>
  112. </TR>
  113. </TABLE>