the following is working fine with firefox but not with IE(unknown runtime error), any idea??
<html>
<head>
<title></title>
<script language="javascript">
function f()
{
document.getElementById("tbl").innerHTML = "<tr><td>col 1</td><td>col 2</td></tr>";
}
</script>
</head>
<body>
<table>
<thead>
<tr>
<th>Col 1</th>
<th>Col 2</th>
</tr>
</thead>
<tbody id="tbl">
</tbody>
</table>
<input type="button" value="click" onclick="f();" />
</body>
</html>
what if the rows and cell comes to me already rendered and i have to add it to a table??
i receive string contains "<tr><td></td></tr><tr><td></td></tr>" , so i should embedded this text in a table or a tbody ?????
the following is something typical to my case, it gives error with IE, now the above solutions require me to build the whole table where it is already built, and a string including the rows and cells should be appended, BUT HOOOOW ???
<html>
<head>
<title></title>
<script language="javascript">
function f()
{
var txt = GetTableContent();//this function will return "<tr><td>text 1</td><td>text 1</td></tr>"
document.getElementById("content").innerHTML = txt;
}
</script>
Bookmarks