• 项目积累——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中的索引

  • 相关阅读:
    将一个表的结果集插入到另一个表中
    sqlite 函数大全
    sqlite数据库实现字符串查找的方法(instr,substring,charindex替代方案)
    sqlite 字符串 转 整型 cast 函数 (强制类型转换 )
    sqlite 截取字符串函数substr
    sql 注释 语法
    实现iOS长时间后台的两种方法:Audiosession和VOIP
    iOS越狱知多少?
    从一个开发者的角度看越狱
    iPhone系统常用文件夹位置
  • 原文地址:https://www.cnblogs.com/Defry/p/4437518.html
Copyright © 2020-2023  润新知