Friday 15 August 2014

HTML table td display -


I have several HTML tables in which it has some Ruby code embedded it will look below:

  & Lt;% loop-1% & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; Td rowspan = "X" & gt; ABCD & lt; / Td> & Lt; TD & gt; Xyz & lt; / TD & gt; & Lt; / TR & gt; & Lt;% loop-2% & gt; & Lt;% If (Condition)% & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; / TD & gt; & Lt; TD & gt; Xyz1 & lt; / TD & gt; & Lt; / TR & gt; & Lt;% end% & gt; & Lt;% end% & gt; & Lt; / Table & gt; & Lt;% end% & gt;   

So many tables are generated based on the loop-1, as shown above. Now each table will have at least one row after the first line, then another loop-2 and some position. For each table, the number of rows after the first line can be variable. I want the first time in the light (x) = number first. The total of the rows for that table.

For example. If after the first line, loop -2 generates 2 more rows, then I should have x = 3

< P> The only possible way you can not do this by using HTML is that how many event status befroe will be your loop. To wit. Before executing the same loop and increasing x each time the condition is found.

No comments:

Post a Comment