Hi there
can someone please help me with creating dynamic content in a table? For
example, see the below javascript and html - why is a new row not created in
the table when I click the button? (I am using Internet Explorer 6).
<html>
<head>
<title>TEST</title>
<script language="javas cript">
function addField() {
alert( 'Add Field' );
my_div.innerHTM L = my_div.innerHTM L + "<tr><td>ne w row</td></tr>";
}
</script>
</head>
<body>
<table border="1">
<tr>
<td>
first row
</td>
</tr>
<div id="my_div"></div>
<tr>
<td>
<input type="button" value="click me"
onclick="javasc ript:addField() " >
</td>
</tr>
</table>
</body>
</html>
Thanks,
Peter
can someone please help me with creating dynamic content in a table? For
example, see the below javascript and html - why is a new row not created in
the table when I click the button? (I am using Internet Explorer 6).
<html>
<head>
<title>TEST</title>
<script language="javas cript">
function addField() {
alert( 'Add Field' );
my_div.innerHTM L = my_div.innerHTM L + "<tr><td>ne w row</td></tr>";
}
</script>
</head>
<body>
<table border="1">
<tr>
<td>
first row
</td>
</tr>
<div id="my_div"></div>
<tr>
<td>
<input type="button" value="click me"
onclick="javasc ript:addField() " >
</td>
</tr>
</table>
</body>
</html>
Thanks,
Peter
Comment