Recently there is a demand for the project,When joining a new organization,Need to choose its parent organization,Organize the code below,Share with everyone,

In the project,Need to complete such a function:When joining a new organization,Need to choose its parent organization,This is achieved by clicking the Find and Fill button,A pop-up window pops up,The user clicks on the desired row,And click the OK button,Send the organization name and organization code selected by the user back to the page to join the new organization.

Record the popup page code here

<! Doctype html public "-//wc //dtd html. Transitional //en" "http://www.w.org/tr/html/loose.dtd">
 <%@page contenttype="text/html;charset=utf-" pageencoding="utf-" language="java"%>
 <%@taglib uri="/struts-tags" prefix="s"%>
 <%@taglib uri="/page-tags" prefix="p"%>
     <title>institution click query</title>
     <meta http-equiv="content-type" content="text/html;charset=utf-">
     <link rel="stylesheet" type="text/css" href="../css/style.css" />
     <link rel="stylesheet" type="text/css" href="../css/newstyle.css" />
     <script type="text/javascript" src="../js/jquery.js"></script>
     <script type="text/javascript" src="../js/common.js"></script>
     <script type="text/javascript" charset="utf-">
 //Click the entire row to select the radio box
     function clicktr (obj) {
     $("#maintable tbody tr td input [type =" radio "]"). attr ("checked",         "undefined");
     $("td input [type =" radio "]", obj) .attr ("checked", "checked");
     //alert ($("td input [name =" insideequip.equipinstance "]", obj) .val ());
 //Pass the value obtained through the class of td to the element corresponding to the parent page
   function setvalue () {
     var input=$("#maintable tbody tr td input [type =" radio "]:checked");
     if (! input.val ()) {
       window.close ();
     var tr=input.parent (). parent ();
     window.opener.document.getelementbyid ("textagencyid"). value=$(
         "td.agancy input", tr) .val ();
     window.opener.document.getelementbyid ("textagencyname"). value=$(
         "td.agencyname", tr) .text ();
     window.close ();
 <form action="" method="post">
     <input type="button" value="OK" onclick="javascript:setvalue ();" />
               <th>institution number</th>
               <th>institution name</th>
               <!-<th>Job Code</th>->
               <th>Organization code</th>
               <th>Institution category</th>
    <s:iterator value="busiagencys" var="p">
     <tr onclick="clicktr (this);">
     <td><input type="radio" name="log" value="&s:property value =" agencyid "/>"></td>
     <td><s:property value="agencyid" /></td>
     <td><s:property value="agencyname" /></td>
     <!-<td><s:property value="handle" /></td>->
     <td><s:property value="sjjg" /></td>
     <td><s:property value="orgcode" /></td>
     <td><s:property value="jglb" /></td>
     <p:page href="findbusiagency" css="pages" totalpage="${totalpage}" page="${page}"></p:page>
   <script type="text/javascript">
   $(". tablelist tbody tr:odd"). addclass ("odd");
  • Previous Analysis of the use of Java exception handling assertions
  • Next Detailed ajax async synchronous and asynchronous in jQuery