form_cool.aspx
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:9k
源码类别:

OA系统

开发平台:

C#

  1. <%@ Page Language="C#" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  3. <HTML>
  4. <HEAD>
  5. <title>表单智能设计器</title>
  6. <script Language="JavaScript">
  7. self.moveTo(0,0);
  8. self.resizeTo(screen.availWidth,screen.availHeight);
  9. self.focus();
  10. function CheckForm()
  11. {
  12.    if(EDIT_HTML.get_docHtml()=="")
  13.    { alert("表单内容不能为空!");
  14.      return (false);
  15.    }
  16.    return (true);
  17. }
  18. function send()
  19. {
  20.  if(CheckForm())
  21.  {
  22.    if(EDIT_HTML.switchMode.checked == true)
  23.    {
  24.       alert("源文件模式,不能保存!");
  25.       return;
  26.    }
  27.    document.form1.CONTENT.value=EDIT_HTML.get_docHtml();
  28.    document.form1.submit();
  29.  }
  30. }
  31. function myclose()
  32. {
  33.  msg='关闭表单设计器前,保存对表单的修改?';
  34.  if(window.confirm(msg))
  35.  {
  36.    document.form1.CLOSE_FLAG.value="1";
  37.    send();
  38.  }
  39.  else
  40.    window.close();
  41. }
  42. function Load_Do()
  43. {
  44.   EDIT_HTML.insertHtml("strFormModel %>");
  45.   EDIT_HTML.focus();  
  46.   <% = Request.QueryString["save"]!=null?"alert('表单已保存!')" : ""%>
  47. }
  48. function cool_textfield()
  49. {
  50.   URL="cool_textfield.aspx";
  51.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  52.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  53.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:150px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  54. }
  55. function cool_textarea()
  56. {
  57.   URL="cool_textarea.aspx";
  58.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  59.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  60.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:150px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  61. }
  62. function cool_listmenu()
  63. {
  64.   URL="cool_listmenu.aspx";
  65.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  66.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  67.   window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:290px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  68. }
  69. function cool_checkbox()
  70. {
  71.   URL="cool_checkbox.aspx";
  72.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  73.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  74.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:120px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  75. }
  76. function cool_calendar()
  77. {
  78.   URL="cool_calendar.aspx";
  79.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  80.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  81.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:120px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  82. }
  83. function cool_auto()
  84. {
  85.   URL="cool_auto.aspx";
  86.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-380;
  87.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  88.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:360px;dialogHeight:250px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  89. }
  90. function cool_calc()
  91. {
  92.   URL="cool_calc.aspx";
  93.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  94.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  95.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:180px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  96. }
  97. function cool_listview()
  98. {
  99.   URL="cool_listview.aspx";
  100.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-450;
  101.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  102.   window.showModalDialog(URL,self,"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:420px;dialogHeight:290px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  103. }
  104. function cool_user()
  105. {
  106.   URL="cool_user.aspx";
  107.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  108.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  109.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:330px;dialogHeight:120px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  110. }
  111. function cool_sign()
  112. {
  113.   URL="cool_sign.aspx";
  114.   loc_x=document.body.scrollLeft+event.clientX-event.offsetX-350;
  115.   loc_y=document.body.scrollTop+event.clientY-event.offsetY+62;
  116.   window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:320px;dialogHeight:100px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
  117. }
  118. </script>
  119. </HEAD>
  120. <body class="bodycolor" leftmargin="0" topmargin="0" onload="Load_Do();">
  121. <table width="100%" height="100%" class="big" bgcolor="#000000" border="0" cellpadding="3"
  122. cellspacing="1" align="center">
  123. <tr bgcolor="#DDDDDD">
  124. <td class="TableHeader" colspan="2" height="20">
  125. <b>表单智能设计器</b>:<span class="small">首先,将网页设计工具或Word编辑好的表格框架粘贴到表单设计区。然后,创建表单控件。</span>
  126. </td>
  127. </tr>
  128. <tr bgcolor="#DDDDDD">
  129. <td bgcolor="#DDDDDD" width="100%">
  130. <iframe id="EDIT_HTML" style="BACKGROUND-COLOR: buttonface" src="/module/rte/index.aspx?form_id=intFormId %>" width="100%"
  131. height="100%" type="text/x-scriptlet" VIEWASTEXT></iframe>
  132. </td>
  133. <td valign="top" align="center">
  134. <table width="120" border="0" cellspacing="1" class="small" bgcolor="#ffffff" cellpadding="3"
  135. align="center">
  136. <tr class="TableHeader">
  137. <td align="center">表单控件</td>
  138. </tr>
  139. <tr class="TableHeader">
  140. <td align="center"><button style="width:120;text-Align:left" onclick="cool_textfield()"><img src="/images/form/textfield.gif" align="absmiddle">单行输入框</button></td>
  141. </tr>
  142. <tr class="TableHeader">
  143. <td align="center"><button style="width:120;text-Align:left" onclick="cool_textarea()"><img src="/images/form/textarea.gif" align="absmiddle">多行输入框</button></td>
  144. </tr>
  145. <tr class="TableHeader">
  146. <td align="center"><button style="width:120;text-Align:left" onclick="cool_listmenu()"><img src="/images/form/listmenu.gif" align="absmiddle">下拉菜单</button></td>
  147. </tr>
  148. <tr class="TableHeader">
  149. <td align="center"><button style="width:120;text-Align:left" onclick="cool_checkbox()"><img src="/images/form/checkbox.gif" align="absmiddle">选择框</button></td>
  150. </tr>
  151. <tr class="TableHeader">
  152. <td align="center"><button style="width:120;text-Align:left" onclick="cool_listview()"><img src="/images/form/listview.gif" align="absmiddle">列表控件</button></td>
  153. </tr>
  154. <tr class="TableHeader">
  155. <td align="center"><button style="width:120;text-Align:left" onclick="cool_auto()"><img src="/images/form/auto.gif" align="absmiddle">宏控件</button></td>
  156. </tr>
  157. <tr class="TableHeader">
  158. <td align="center"><button style="width:120;text-Align:left" onclick="cool_calendar()"><img src="/images/form/calendar.gif" align="absmiddle">日历控件</button></td>
  159. </tr>
  160. <tr class="TableHeader">
  161. <td align="center"><button style="width:120;text-Align:left" onclick="cool_calc()"><img src="/images/form/calc.gif" align="absmiddle">计算控件</button></td>
  162. </tr>
  163. <tr class="TableHeader">
  164. <td align="center"><button style="width:120;text-Align:left" onclick="cool_user()"><img src="/images/form/user.gif" align=absmiddle>部门人员控件</button></td>
  165. </tr>
  166. <tr class="TableHeader">
  167.     <td align="center"><button style="width:120;text-Align:left" onclick="cool_sign()"><img src="/images/form/sign.gif" height=20 width=20 align=absmiddle>安全签章控件</button></td>
  168. </tr>
  169. </table>
  170. <br>
  171. <table width="120" border="0" cellspacing="1" class="small" bgcolor="#ffffff" cellpadding="3"
  172. align="center">
  173. <tr class="TableHeader">
  174. <td align="center">保存与退出</td>
  175. </tr>
  176. <form action="cool_submit.aspx" method="post" name="form1">
  177. <tr class="TableHeader">
  178. <td align="center"><button style="width:120;height:30;text-Align:center" onclick="send()"><b>保存表单</b></button></td>
  179. </tr>
  180. <tr class="TableHeader">
  181. <td align="center"><button style="width:120;height:30;text-Align:center" onclick="myclose()"><b>关闭设计器</b></button></td>
  182. </tr>
  183. <input type="hidden" name="CONTENT" value="">
  184. <input type="hidden" name="CLOSE_FLAG" value="0">
  185. <input type="hidden" name="FORM_ID" value="intFormId%>">
  186. </form>
  187. </table>
  188. </td>
  189. </tr>
  190. </table>
  191. </body>
  192. </HTML>