SelectFile.asp
Upload User: jisenq
Upload Date: 2014-06-29
Package Size: 7216k
Code Size: 2k
Category:

ADO-ODBC

Development Platform:

ASP/ASPX

  1. <% Option Explicit %>
  2. <!--#include file="../../FS_Inc/Const.asp" -->
  3. <%
  4. Dim CurrPath
  5. CurrPath = Request.QueryString("CurrPath")
  6. %>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  11. <title>选择文件</title>
  12. </head>
  13. <link href="../images/skin/Css_<%=Session("Admin_Style_Num")%>/<%=Session("Admin_Style_Num")%>.css" rel="stylesheet">
  14. <body>
  15. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  16.   <tr> 
  17.     <td><select onChange="ChangeFolder(this.value);" id="FolderSelectList" style="width:100%;" name="select">
  18.         <option selected value="<% = CurrPath %>"><% = CurrPath %></option>
  19.       </select></td>
  20.   </tr>
  21.   <tr> 
  22.     <td width="70%"> <iframe id="FolderList" width="100%" height="300" frameborder="1" src="FolderList.asp?CurrPath=<% = CurrPath %>"></iframe></td>
  23.   </tr>
  24.   <tr> 
  25.     <td height="35"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  26.         <tr> 
  27.           <td height="30" align="center"> 
  28.             <input type="button" onClick="SelectFile();" name="Submit" value=" 确 定 "> 
  29.           </td>
  30.           <td align="center"> 
  31.             <input onClick="window.close();" type="button" name="Submit3" value=" 取 消 "></td>
  32.         </tr>
  33.       </table></td>
  34.   </tr>
  35. </table>
  36. </body>
  37. </html>
  38. <script language="JavaScript">
  39. var SysRootDir='<% = G_VIRTUAL_ROOT_DIR %>';
  40. function ChangeFolder(FolderName)
  41. {
  42. frames["FolderList"].location='FolderList.asp?CurrPath='+FolderName;
  43. }
  44. function SelectFile()
  45. {
  46. if (frames["FolderList"].FileName!='')
  47. {
  48. var PathInfo='',TempPath='';
  49. if (SysRootDir!='')
  50. {
  51. TempPath=frames["FolderList"].CurrPath;
  52. PathInfo=TempPath.substr(TempPath.indexOf(SysRootDir)+SysRootDir.length);
  53. }
  54. else
  55. {
  56. PathInfo=frames["FolderList"].CurrPath;
  57. }
  58. window.returnValue=PathInfo+'/'+frames["FolderList"].FileName;
  59. window.close();
  60. }
  61. else
  62. alert('请选择选择文件');
  63. }
  64. window.onunload=SetReturnValue;
  65. function SetReturnValue()
  66. {
  67. if (typeof(window.returnValue)!='string') window.returnValue='';
  68. }
  69. </script>