NotifyFile.aspx
上传用户:tree100901
上传日期:2007-06-03
资源大小:2295k
文件大小:2k
源码类别:

OA系统

开发平台:

C#

  1. <%@ Page language="c#" Codebehind="NotifyFile.aspx.cs" AutoEventWireup="false" Inherits="OA.NotifyFile" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  3. <HTML>
  4. <HEAD>
  5. <title>NotifyFile</title>
  6. <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
  7. <meta name="CODE_LANGUAGE" Content="C#">
  8. <meta name="vs_defaultClientScript" content="JavaScript">
  9. <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
  10. <script language="javascript">
  11. var intCallID=0;
  12. function Init()
  13. {
  14. if(divFile.innerHTML==""){
  15. GetNewFile();
  16. setInterval("GetNewFile()",5000);
  17. }
  18. }
  19. function GetNewFile()
  20. {
  21.   divFile.innerHTML='';
  22.   Service.useService("http://218.84.107.8/OA/WebService1/OAService.asmx?WSDL","FileService");
  23.   intCallID=Service.FileService.callService(RealTime_Result,"GetNewFile",document.all.Hidden1.value);
  24. }
  25. function RealTime_Result(result)
  26. {
  27.  if(result.error)
  28.  {
  29.   divFile.innerHTML="";
  30.  }
  31.  else
  32.  {
  33.  if(divFile.innerHTML==""&&result.value != ""){
  34.  divFile.innerHTML= "<img src='images//grayDots.gif'border='0'>&nbsp;&nbsp;<a style= 'CURSOR:hand;'onclick=javascript:OpenWin();>你的新文件来了!</a>";
  35.  window.setInterval("divFile.style.color ='#6699ff'",500);
  36.  window.setInterval("divFile.style.color ='white'",500);
  37.  }
  38.  }
  39. }
  40.  function OpenWin(){
  41.  window.open('DisplayFile.aspx?PersonID='+document.all.Hidden1.value,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=0,top=0,width=100,height=100');
  42.  setInterval("GetNewFile()",5000);
  43.  }
  44. </script>
  45. </HEAD>
  46. <body onload="Init()" oncontextmenu='return false' bgcolor="lightgrey" topmargin="5" leftmargin="1"
  47. rightmargin="1">
  48. <form id="Form1" method="post" runat="server">
  49. <INPUT style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" type="hidden" id="Hidden1"
  50. name="Hidden1" runat="server">
  51. <div id="Service" style="BEHAVIOR:url(webservice.htc)"></div>
  52. <div id="divFile" style="FONT-SIZE: 9pt; VERTICAL-ALIGN: baseline; FONT-FAMILY: 宋体; TEXT-ALIGN: center"
  53. align="center"></div>
  54. </form>
  55. </body>
  56. </HTML>