The htmltablecellexists( function returns true if an HTML table contains the specified cell, false if it doesn’t.
Parameters
This function has three parameters:table – text of the HTML table. If this parameter contains the body of an HTML table, the table must contain <tr>
and <td>
tags (however, the actual <table>
and </table>
tags themselves are not required).
row – row number within HTML table. Rows are numbered starting from 1.
column – column number within HTML table. Columns are numbered starting from 1.
Description
This function checks to see whether a cell in an HTML table exists or not. The result will be true if the cell exists, or false if it doesn’t. Suppose you set up a variable with an HTML table, like this:
local htable
htable =
"<tr><td><font size=-1>Alaska</font></td><td>AK</td></tr>
<tr><td><font size=-1>Arizona</font></td><td>AR</td></tr>
<tr><td><font size=-1>Wyoming</font></td><td>WY</td></tr>"
Once this variable is set up, you can check to see if different cells exist or not.
htmltablecellexists(htable,2,1) ☞ -1 (true)
htmltablecellexists(htable,3,2) ☞ -1 (true)
htmltablecellexists(htable,1,6) ☞ 0 (false)
htmltablecellexists(htable,6,1) ☞ 0 (false)
Note: This function is equivalent to:
tagdata(tagdata(thetable,"<tr","</tr>",row),"<td","</td>",col)<>""
See Also
History
Version | Status | Notes |
10.0 | No Change | Carried over from Panorama 6.0. |