Jump to content

Nested table


timb
 Share

Recommended Posts

I'm trying to find a nested table row where the bgcolor is set to red and return the link that exist within that row.

As I have understood you can not use something like ETagNameGetCollection because the table is inside another table or am I wrong about that? I's there another way to grab the link?

The HTML code looks something like this:

<TABLE CELLSPACING='0' CELLPADDING='0' BORDER='0' BGCOLOR='red' onmouseover="this.style.backgroundColor='#8fc2cf';" onmouseout="this.style.backgroundColor='red';" STYLE='width:870px;height:14px; border-left:2px solid #d4d4d4;border-right:2px solid #d4d4d4;'><TR><TD STYLE='width:100px;'>&nbsp;<A HREF='' onclick='tdwlhand()'>2008-10-21</A></TD><TD STYLE='width:280px;'>sudo</TD><TD STYLE='width:300px;'><A HREF='index.php?tddeid=34'>bl 2</A><TD STYLE='width:100px;'>bl 3</TD><TD STYLE='width:35px;'></TD><TD STYLE='width:55px;'>&nbsp;<IMG SRC="layout/remove.gif" border="0" onclick="alert('VARNING')";></A></TD></TD></TR></TABLE>
Link to comment
Share on other sites

I'm trying to find a nested table row where the bgcolor is set to red and return the link that exist within that row.

As I have understood you can not use something like ETagNameGetCollection because the table is inside another table or am I wrong about that? I's there another way to grab the link?

The HTML code looks something like this:

<TABLE CELLSPACING='0' CELLPADDING='0' BORDER='0' BGCOLOR='red' onmouseover="this.style.backgroundColor='#8fc2cf';" onmouseout="this.style.backgroundColor='red';" STYLE='width:870px;height:14px; border-left:2px solid #d4d4d4;border-right:2px solid #d4d4d4;'><TR><TD STYLE='width:100px;'>&nbsp;<A HREF='' onclick='tdwlhand()'>2008-10-21</A></TD><TD STYLE='width:280px;'>sudo</TD><TD STYLE='width:300px;'><A HREF='index.php?tddeid=34'>bl 2</A><TD STYLE='width:100px;'>bl 3</TD><TD STYLE='width:35px;'></TD><TD STYLE='width:55px;'>&nbsp;<IMG SRC="layout/remove.gif" border="0" onclick="alert('VARNING')";></A></TD></TD></TR></TABLE>
You can get tags within the table, just get a reference to the correct table first, then use the table object for where to get the tag collection from:
$colTRows = _IETagNameGetCollection($oTable, "TR")

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...