在弹出窗口中显示所选值

时间:2017-01-11 07:08:54

标签: javascript java jsp spring-mvc

我想知道如何在弹出窗口中显示所选值的列表作为下拉列表。 这是我的clientview.jsp代码

</head>
    <body>
        <jsp:include page="clientusrmapheader.jsp">
            <jsp:param name="" value="true"/>
       </jsp:include>

          <div class="tcc" style="min-height:620px; width:100%;float:left;">
              <form:form method="POST" modelAttribute="clientAccounts" action="/client_user_map.html">
                           <div id='baseDiv'>
                                         <input type="submit" value="CLIENT-USER MAP"/>
                                        <%@ include file="/WEB-INF/views/clientusermap.jsp"%>
                </div>
            <table>
                <thead>
                    <tr>
                        <th><span class="selectALLWrap"> <input type='checkbox' id='selectALL' onclick='selectALLQuestion()'></span><span>Select</span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
                        <th class="sortable" id='clientName' >Client Name</th>
                    </tr>
                </thead>
               <tbody style="font-size: 18px;font-family: 'HelveticaNeue-Medium';">
                   <c:forEach items="${clientAccountsList}" var="clientAccount">
                        <tr>
                            <td><div class="checkBoxSel"><form:checkbox path="clientName" value="${clientAccount.clientName}"/> </div></td>
                            <td>${clientAccount.clientName}</td>
                        </tr>
                    </c:forEach>
            </table> 
              </form:form>
              </div>
    </body>

当上面的代码执行时,我得到客户列表..现在我想选择几个客户端并点击客户端用户地图......那些值应该显示为弹出窗口...

我已经写了另一个jsp,其中显示了选定的客户端..

这是clientusermap.jsp

<link rel="stylesheet" type="text/css" href="/css/clientusermap.css" />
<html>
    <head>
        <script>
          $("#baseDiv").click(function(e) {
            $("#popUpDiv").show();
             });  
        </script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
    </head>
    <body>
       <div class="tcc" style="min-height:620px; width:100%;float:left;">   
           <form:form modelAttribute="clientAccounts">
<table border="0">
    <tr>
        <tr>
    <td class = "select">select user :         
    </td>   
    <td ALIGN="center">
       <select>        

       </select>
    </td>        
</tr>
<tr>
    <td class = "select">List of Clients :         
    </td> 

    <td ALIGN="center">
        <div id="popUpDiv">
            <form:select path="clientName" id="selectPopUp">
          <form:option value="-1">Select</form:option>
         <form:options items="${clientNameList}"  />
        </form:select>
        </div>
    </td>        
</tr>
    </TR>
</table>
</form:form>
<input TYPE="submit" VALUE="save">
<input TYPE="reset" VALUE="cancle"> 
       </div>
    </body>
</html>

Screen capture

0 个答案:

没有答案