i wrote a xlst code to transform xml to html which creates lots of tables in html.
there is a column by name ‘Type’ in the table. which contains words
1) Trace
2) Verification
3) Action
the above 3 word’s will repeat many times in the same column of the table.
my requirement is to display how many times each word appeared in the column
and i should show the count immediately when the html page get loaded
Here goes the general schema of the tables
/*Table Schema*/
<table>
<tr>
<th>Time</th>
<th>Position</th>
<th>Type</th>
<th>Message</th>
</tr>
<tr>
<td>....</td>
<td>....</td>
<td>Action</td>
<td>....</td>
</tr>
<tr>
<td>....</td>
<td>....</td>
<td>Verification</td>
<td>....</td>
</tr>
<tr>
<td>....</td>
<td>....</td>
<td>Trace</td>
<td>....</td>
</tr>
<tr>
<td>....</td>
<td>....</td>
<td>Error</td>
<td>....</td>
</tr>
The above is the general schema of the table and the words action, trace, error, verification occurs many times in a single table
There will be arround 5 tables of each type
Demo : http://jsfiddle.net/PhB7x/5/ Demo
You can do this using jquery
Consider the example html
The js will be
Demo of getting Count in loading itself
Demo of getting count from every tables
Demo of getting count from each tables and showing result in html itself