I have a question. It is possible to parse Javascript generated html tables? Because I tried with simple html dom, and I got a blank page for result every time.
Here is the parsed website:
<html>
<head>
<script src="informations.php" type="text/javascript" language="javascript"></script>
</head>
<body>
<script language="javascript" type="text/javascript">
<!--
// Draw table from 'jsData' array of objects
function drawTable(tbody) {
var tr, td;
tbody = document.getElementById(tbody);
// loop through data source
for (var i = 0; i < data.length; i++) {
tr = tbody.insertRow(tbody.rows.length);
tr.setAttribute("class", "f1");
td = tr.insertCell(tr.cells.length);
td.innerHTML = data[i][1];
td = tr.insertCell(tr.cells.length);
td.innerHTML = data[i][2];
td = tr.insertCell(tr.cells.length);
td.setAttribute("align", "center");
td.innerHTML = data[i][3];
td = tr.insertCell(tr.cells.length);
td.setAttribute("align", "center");
td.innerHTML = data[i][4];
td = tr.insertCell(tr.cells.length);
td.setAttribute("align", "center");
td.innerHTML = data[i][5];
}
}
//-->
</script>
<table>
<tr>
<td><h2>Informations</h2></td>
</tr>
</table>
<table class="sortable">
<thead>
<tr>
<th>Name</th>
<th>Information</th>
<th>Birthday</th>
<th>Postcode</th>
<th>Job</th>
</tr>
</thead>
<tbody id="FData"></tbody>
</table>
<script language="javascript" type="text/javascript">
drawTable("FData");
</script>
</body>
</html>
I have no problem with classic tables, but with js generated tables I got blank page for result everytime. What is the solution?