So I'm pretty excited about learning javascript and think I'm doin' pretty good for only being at it a week. Unfortunately this problem is stumping me and I think it's probably relatively simple. I'm just not sure what the steps should be.
I have a table with rows that have classes set dynamically through js that alternate between "searchresultseven" and "searchresultodd" and I'd like to dynamically insert a row after each existing row by classname.
example of the table:
<table class="searchresults" cellpadding="0" cellspacing="0" border="0">
<tr id="searchresultsheader">
<td>Art</td>
<td>Score</td>
<td>Artist</td>
<td>Sortname</td>
<td>Type</td>
<td>Begin</td>
<td>End</td>
</tr>
<tr class="searchresultseven">
<td> </td>
<td>99</td>
<td><a href="/artist/b160e4df-52f8-4487-8375-e8fc7de4970b.html">Beethoven</a> (Marc Trauner)</td>
<td>Beethoven</td>
<td>person</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="searchresultsodd">
<td> </td>
<td>62</td>
<td><a href="/artist/84acc01c-0bad-4747-89b5-f7c4bc0bdcbe.html">Beethoven's Wig</a>
</td>
<td>Beethoven's Wig</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
-
- <table class="searchresults" cellpadding="0" cellspacing="0" border="0">
- <tr id="searchresultsheader">
- <td>Art</td>
- <td>Score</td>
- <td>Artist</td>
- <td>Sortname</td>
- <td>Type</td>
- <td>Begin</td>
- <td>End</td>
- </tr>
- <tr class="searchresultseven">
- <td> </td>
- <td>99</td>
- <td><a href="/artist/b160e4df-52f8-4487-8375-e8fc7de4970b.html">Beethoven</a> (Marc Trauner)</td>
- <td>Beethoven</td>
- <td>person</td>
- <td>
- </td>
- <td>
- </td>
- </tr>
- <tr class="searchresultsodd">
- <td> </td>
- <td>62</td>
- <td><a href="/artist/84acc01c-0bad-4747-89b5-f7c4bc0bdcbe.html">Beethoven's Wig</a>
- </td>
- <td>Beethoven's Wig</td>
- <td>
- </td>
- <td>
- </td>
- <td>
- </td>
- </tr>
-
so basically, I want to load the table; than insert a row with a single cell having a colspan of 7 (so one cell fills the entire row) after every row with a classname of "searchresultseven" or "searchresultsodd" and give it a classname of "resultrowspacer" or something to that effect.
Anyone have any pointers on how to do this?
The reason I have to do this dynamically is because the table is dynamically generated and I don't have access to the script which does creates the table. I'm sure I could get a hold of it if I asked the boss...but I highly doubt I'd be able to comprehend ANY of it since it ties into a perl database.
Also, I'd much rather try at first to figure out the script to do what I want myself...really right now I'm just looking for a point in the right direction. I've only found bits and pieces on the net but don't fully comprehend them. I'm guessing something along the lines of documentWrite but am not totally sure how to use this.

Use your words like arrows to shoot toward your goal.