Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

formatting problem

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Hi friends,
I have the below code, please some one help me in formatting the below code so as to display two coloums in a table.
<table cellpadding="0" cellspacing="0" border="0" id="AutoNumber15">
<tbody><tr id="parentTable">
<% int prodCnt = 0; %>
<td style="vertical-align: top">
<logic:iterate id="prodTree" name="productSelectionForm" property="treeSet" type="java.util.Map.Entry" indexId="idx">
<bean efine id="product" name="prodTree" property="value" type="java.util.Properties"/>
<% if (prodCnt == 0 || prodCnt == 10) { %>
<td style="vertical-align: top">
<table cellpadding="6" cellspacing="0" width="350" id="AutoNumber15">
<tbody>
<%} %>
<logic:equal name="product" property="level" value="1">
<% prodCnt++; %>
<tr style="background-color: #D8D8D8" id="<%=prodTree.getKey()%>">
<td style='<%= "padding-left:" + product.getProperty("indent") + ";width:1;background-color: #D8D8D8"%>'>
<html:multibox style="background-color: #D8D8D8" name="productSelectionForm" property="selectedProducts" ">
<bean:write name="prodTree" property="key"/>
</html:multibox>
</TD>
<td nowrap style='color:blue;font-weight:bold;width:200;background-color:#D8D8D8;text-align:left'>
<bean:write name="product" property="name" />
</td>
<td NOWRAP style="background-color: #D8D8D8;width:200"/>
<td style='color:blue;cursor:hand;text-decoration:underline;width:200
>Learn more</td>

</tr>
<tr>
<td colspan="4" bgcolor="#FFFF99";id="<%=prodTree.getKey()%>"
style="display: none" id="toggleMe" text-align:left>
<bean:write name="product" property="learn_more" />
</td></tr>

<tr>
<td colspan='3'><a href="javascript roductToggle(this)" style="text-decoration:underline">See All Subproducts</a></td>
</tr>
</logic:equal>

</logic:iterate>

<% if (prodCnt == 10 || prodCnt == 18) { %>

</tbody>
</table></td>
<% } %>
</td></tr>
</tbody>
</table>
with regards,
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extermely hard to read and many people that might be able to help you will just move along. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
reply
    Bookmark Topic Watch Topic
  • New Topic