zoukankan      html  css  js  c++  java
  • 项目积累——POPUP

    父页面:

    <td nowrap>

    合同名称:

    </td>

    <td colspan="2" nowrap>

    <param:popup clientCondition="true" condition="$bmbh,$nd"

    type="cght1" empty="true" label="合同名称" readonly="true"

    name="cghtzdwhListForm" property="mc" popupModal="dropdown"

    popupDisplayModal="body" clickImg="/images/search.gif"

    validator="text(0,350)" styleId="mc" targets="ht,mc,zje"

    size="110" />

    </td>子页面cghtzdList.jsp

    <%

        String path = request.getContextPath();

        String basePath = request.getScheme() + "://"

               + request.getServerName() + ":" + request.getServerPort()

               + path + "/";

    %>

    <% 

        String parentElementId = request.getParameter("parentElementId");

        String syb = request.getParameter("bmbh");

        String qdrq = request.getParameter("nd");

        BaseCghtzdwhDAO bj = new BaseCghtzdwhDAO();

        List<CghtzdwhPO> l = bj.queryHt(syb, qdrq);

        int si=l.size();

        request.setAttribute("listHt", l);

       

       

    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

     

        <head>

           <common:theme />

           <title>采购合同名称</title>

           <script language='JavaScript'>

        function clickJs(ht,mc,zje)

        {

            var returnValue = new Object();

            returnValue.id=ht;

           if(ht==""|| ht == null){

               returnValue.name='';

           }else{

               returnValue.name="<"+ht+">"+mc+"("+zje+"元)";

           }

            returnValue.id=ht;

            window.returnValue=returnValue;

            window.parent.floatWindow<%=parentElementId%>.returnValue=returnValue;

           window.parent.floatWindow<%=parentElementId%>.hidden();

        }

    function clear1(){

        var ms=document.getElementById("selectText").value;

         if(ms=="输入筛选条件"){

            document.getElementById("selectText").value="";

            document.getElementById("selectText").style.color="black";

         }

        }

         function set1(){

            if(document.getElementById("selectText").value==""){

            document.getElementById("selectText").value="输入筛选条件";

            document.getElementById("selectText").style.color="";

           }

         }

       

         function sel(){

        // alert(sss);

            var length1 = <%=si%>;

            var selectText = document.getElementById("selectText").value;

            var td1 = null;

            var tr1 = null;

        //  if(selectText!="" ){

            for (var i = 0 ;i<length1;i++){

               tr1 = document.getElementById(i);

                td1  =  tr1.childNodes[0];

               if((td1.innerText).indexOf(selectText)<0[c1] ){

                  tr1.style.display="none";

               }else{

                  tr1.style.display="";

               }

            }

           //}

         }

        </script>

     

    </head>

    <body bgColor="#F8FBFC">

    <table>  

         <tr>

            <td bordercolor="red" background="green"><font color="black">输入<Strong>合同或合同号</Strong>进行模糊匹配<br/></font>

            <input type="text" onkeyup="sel()" id="selectText"  onblur="set1()"  value="输入筛选条件" onfocus="clear1()" size="24" style="" >

            </td>

         </tr>

    </table>

     <table>

         <tr>

            <td onMouseOver=" this.style.cursor='hand';this.style.backgroundColor='#99E2FB'  "

    onclick="clickJs('','--请选择合同--','')" style="text-align: left; font-size: 12; color: blue" nowrap="nowrap" onmouseout="this.style.backgroundColor=''">

    --请选择合同--

    </td>

    </tr>

    <tr id="0">

    <%

         for (int i = 0; i < si; i++) {

    %>

    <td onMouseOver=" this.style.cursor='hand';this.style.backgroundColor='#99E2FB'  "

                   onclick="clickJs('<%=l.get(i).getHt().trim()%>','<%=l.get(i).getMc().trim()%>','<%=l.get(i).getZje()%>')" style="text-align: left; font-size: 12; color: blue" nowrap="nowrap" onmouseout="this.style.backgroundColor=''">

                   &lt;<%=l.get(i).getHt().trim()%>&gt;<%=l.get(i).getMc().trim()%>&nbsp;&nbsp;(金额:<%=l.get(i).getZje()%>元)

    </td>

    </tr>

    <tr id="<%=i + 1%>">

    <%

         }

    %>

    </tr>

    </table>

    </body>

    Popup配置:

    <!-- 采购合同付款计划维护 采购合同编号  -->

    <entry key="cght2">

    <bean class="com.cvicse.commons.param.config.PopupParameterConfig">

    <property name="URL" value="/cvicdns/htgl/cght/cghtzdList.jsp?bmbh=?&amp;nd=?" />

    <property name="style" value="top:0;" />

    <property name="height" value="100" />

    <property name="width" value="560" />

    <property name="returnValueSeperatorOrProperties" value="id,name" />

    </bean>

    </entry>


     [c1]B.indexOf(c),C在字符串B中的索引

  • 相关阅读:
    如何将php数组或者对象传递给javascript
    js函数定时器,定时读取系统实时连接数
    采用highchart js+flot+rrd生成cpu、mem状态监控图
    jquery动态加载 去除js
    js控制href内容的连接内容的变化
    js动态控制table的tr,td增加及删除
    php生成PDF文件(FPDF)
    .NET 单点登录开源项目
    WF控制台工作流(2)
    WF控制台工作流(1)
  • 原文地址:https://www.cnblogs.com/Defry/p/4437518.html
Copyright © 2011-2022 走看看