10 Replies Latest reply: Jul 26, 2011 5:28 AM by EJP RSS

    Displaying results of a row in a pop up window(JSP) on a click of checkbox

    866972
      Hi,

      In the code below it displays the list of items which is 4 columns and rows getting populated dynamically. Now there are checkbox in 1st column.

      My question is if any of the row is selected by clicking on the checkbox, it should open a new pop up window (jsp) and those results of the row should be displayed in that pop up window.

      Please let me know how it is done ?


      <HTML>
      <%
      /
           
           ArrayList ret1= (ArrayList) session.getAttribute(GuiConstants.RET_DA);
      HashMap sel1 = (HashMap) session.getAttribute(GuiConstants.RET_PAY);
           Object enableSelAll = request.getAttribute(GuiConstants.RETURNS_ENABLE_SEL_ALL);
           if ( debug ) { System.out.println( MODULE_NAME + "enableSelAll= " + enableSelAll ); }
           
           int cntFound = 0;
           int selPayList = 0;
           String checkUnavilable = null;
           
           
           
           
           if( enableSelAll != null) { checkUnavilable = enableSelAll.toString();}
           if( sel1 != null){ selPayList = sel1.size();}
           if ( ret1!= null ){ cntFound = retPayList.size(); }
           if
      %>

           
                
           </tr>
      </table>     
      <% } %>
                                         
      <tr>
           <td>
           <table class="sortable" id="unique_id" width="100%" cellpadding="0" cellspacing="5">
                          <tr class="resultsHeaderStyle">
                               <th>Select</th>
                               <th>Code</th>
                               <th> ID</th>
                               <th nowrap>Customer Account No</th>
                               <th nowrap> Customer Name </th>
                               
                          </tr>     
      <%
           try {
                int i = startRow;
                int checkCB = 0;
           while (i < (startRow + rowsPerPage) && i < retPayList.size())
           {
                     PayyVO rpl = (PayyVO) retPayList.get( i );
                                    
                     
                
      %>     
                          <tr class="resultsStyleAltRow">
                               <td> </td>
      <%               } else { %>     
                          <tr class="resultsStyle">
      <%                     String index = (new Integer(i)).toString();
                          if(sel1 != null && sel1.containsKey(index))
                          {
      %>
                               <td><input type=checkbox name="<%= GuiConstants.CHECKBOX_PARM %>" value="<%= i %>"
                                         checked onclick="javascript:HighlightRow(this);"></td>                         
                <%      } else { %>
                               <td><input type=checkbox name="<%= GuiConstants.CHECKBOX_PARM %>" value="<%= i %>" onclick="javascript:HighlightRow(this);"></td>                         
      <%                }
                     }//end ifelse %>
                               <td align="center"><%= rpl.getCd()%></td>
                               <td align="center"><%= rpl.getId()%></td>
                               <td align="center"><%= rpl.getNumber()%></td>
                               <td align="left" nowrap><%= rpl.getName()%></td>
                               
           i++;
      }//endwhile
      }
      catch (Exception e)
      {
      e.printStackTrace();
      }//endtrycatch
      %>

      Edited by: JavaB on Jul 25, 2011 1:23 PM

      Edited by: JavaB on Jul 25, 2011 1:26 PM