Hey,

I am a complete coding n00b and i'm trying to get the following done:
basically i'm generating a table with book related fields such as author, title etc, and the last column is supposed to have a link to the pdf. To save some work i thought on generating a dynamic 'id' for each <tr>. Then i just have to rename all the docs to "document(id number).pdf"

The problem is that i dunno where to begin, i've been reading on the getElementById () but no success yet.

Stupid Example of what i want:
Code:
....
<tr id='122'>
<td><a href='document".$id.".pdf'>view pdf </a></td>
...
</tr>
...

Any help will be greatly appreciated.
Regards,