window.showModalDialog参数传递

弹出的页面


<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
      <%@ include file="../meta.jsp" %>
       <base target="_self">
      <script type="text/javascript" src="${pageContext.request.contextPath}/js/request.js"></script>
      <script type="text/javascript" src="${pageContext.request.contextPath}/js/batch_req.js"></script>
</head>
<body>
<div id="bh">
    <h1>&nbsp;订单信息</h1>
    
 
</div>
<div id="tips">
    
</div>
<div id="wrapper">
    <!-- wrapper Begin -->
    <table cellspacing="0" id="data-grid" class="grid">
            <thead class="tb-tit-bg">
                    <tr>
                      <th width="5%" class="first-cell">
                        <input type="radio" class="checkAll" id="checkAll" onclick = "selectAll(this);" value=""/>
                        </th>
                        <th width="15%" align="center">订单编号</th>
                        <th width="10%" align="center">客户姓名</th>
                        <th width="10%" align="center">产品名称</th>
                        <th width="10%" align="center">产品数量</th>

                    </tr>
            </thead>
            <tfoot class="td-foot-bg">
                    <tr>
               <td colspan="11">
             <a class="btn-general highlight" href="javascript:confirm()"><span>确定</span></a>     
             </td>
             </tr>    
            </tfoot>
            <tbody>
                    <c:if test="${!empty porders}">       
                        <c:forEach items="${porders}" var="porder">
                                <tr class="data">
                                   <td class="first-cell">
                                    <input class="ids" type="radio" value="${porder.orderNo },${porder.proName}"
                                    name="checkId" id="${porder.id }" />
                                </td>
                                        <td >${porder.orderNo }</td>
                                        <td>${porder.consName }</td>
                                        <td>${porder.proName }</td>
                                        <td>${porder.proNum }</td>
                                     
                                 </tr>
                         </c:forEach>
                     </c:if>
             </tbody>
    </table>
</div>
<!-- wrapper End -->
<%@ include file="../footer.jsp" %>
</body>
<script>
    function  confirm(){
        var ind = $("input:checked");
        if(ind.length<1){
          alert("请选择产品!");
          return;
        }
        var obj = new Object;
         obj.id = ind[0].id;
        var str = ind[0].value;
      
         if(str.indexOf(",")>-1){
           var c = str.split(",");
           obj.orderNo = c[0];
           obj.proName =c[1];
           
         }
      window.returnValue = obj;
      window.close();
      
  }
   
</script>
</html>

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

获取内容数据的页面


function showPro(){
       var obj = new Object();
       var reValue = window.showModalDialog("${pageContext.request.contextPath}/porder/indexsel.do",
         obj,"dialogWidth=900px;dialogHeight=500px;center:yes;status:yes;scroll:off;resizable:yes");
         if(reValue!=null){
             $("#orderProductId").val(reValue.id);
             $("#proName").val(reValue.proName);
             $("#orderNo").val(reValue.orderNo);
         }
 
   }




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值