Dewayne_Pinion
8 years agoContributor
How to determine if an HTML table cell contains a textbox?
Greetings,
I have the following script that loops through an HTML table and saves out the contents of the cells to a .txt file. I would like to modify this script to ONLY print out to the file if the cell contains a textbox:
for (var i = 0; i < table.rows.length; i++) { aqFile.WriteToTextFile(fileName, Chr(13) + chr(10) + "Row " + i + Chr(13) + chr(10), aqFile.ctUTF8); for (var j = 0; j < table.rows.item(i).cells.length; j++) { aqFile.WriteToTextFile(fileName, "Cell " + j + ": " + table.rows.item(i).cells.item(j).innerText + Chr(13) + chr(10), aqFile.ctUTF8); } }
Suggestions would be appreciated. Thanks!