[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Loop through HTML table

Asked by vandy02 in Java Programming Language, Hypertext Markup Language (HTML)

I would like to be able to loop through the following table.  This is actually in a JSP that I will be using the looped data to call a java function.
<TABLE >
    <TR>
          <TH><input type="checkbox" name="masterChk"/></TH>
        <TH>Symbol</TH>
        <TH>Name</TH>
        <TH>Price</TH>

    </TR>

Thanks

<%
      java.util.Iterator folio = portfolio.getPortfolio();
      Stock stock = null;
      int recordCnt = 0;      
     
      while (folio.hasNext())
      {      
            recordCnt++;
            stock = (Stock)folio.next();
            String stockSymbol = stock.getSymbol();
            String stockName = stock.getName();
            Float stockPrice = stock.getPrice();
%>            
            <TR>
                  <TD><input type="checkbox" name="chk<%=recordCnt%>" value="<%=stockSymbol%>"/></TD>
                  <TD><%=stockName%></TD>
                  <TD><%=stockSymbol%></TD>
                  <TD><input type=text name="stockPrice<%=recordCnt%>" value="<%=stockPrice%>"></TD>
            </TR>
<%
      }
%>
</TABLE>
 
Related Solutions
 
Loading Advertisement...
 
[+][-]10/28/09 06:46 PM, ID: 25689969Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]10/28/09 06:56 PM, ID: 25690001Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/28/09 08:30 PM, ID: 25690466Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/28/09 11:12 PM, ID: 25691041Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/28/09 11:22 PM, ID: 25691070Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/29/09 12:52 AM, ID: 25691337Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/29/09 12:54 AM, ID: 25691348Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/29/09 01:42 AM, ID: 25691571Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/30/09 05:39 PM, ID: 25707775Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625