If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

The function in the first block of code uses DOM commands to find all TD's and create an object where the first TD is offset 0, and so on. The function includes simple error detection to ensure you can't request an offset greater than the total cells present, otherwise it returns the value of that cell if its offset matches the argument value passed to the function.

The second block of code calls the function twice, as you wanted to pull the value of the first two cells in your request. I simply passed the offset, starting at 0, for the cell to check. Then I store each return value in a variable and create the anchor tag dynamically including those variables. Hope this works for you.

-jim

Last edited by SrWebDeveloper; 07-02-2009 at 03:01 PM.
Reason: Added some help on the bottom

Would it still work? The reason I want to do this is because the entire page is coded in tables, so I'd either have to count by ID, class, or TagName + ID. Also, since there's some commented stuff in the TD tag (auto-generated) will that screw up the innerHTML? Is there a way to retrieve rendered data instead?