Hi for everyone. First of all i'm trying to explain waht i want to do.
I need to insert some code (for example the beggining of a table)
before the code inside of a div, and some other code (for exaple the
end of a table) after the code inside of a div. Here is an example:
Actual code:
<body>
<div id="idDIV">
<table>
<tr>
<td>Some text</td>
</tr>
</table>
</div>
</body>
I want to make the code above like this:
<body>
<div id="idDIV">
<table>
<tr>
<td>
<table>
<tr>
<td>Some text</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
I'm trying to do this with this code:
var code = '<table><tr><td >'+document.all .idDIV.innerHTM L+'</td></tr></table>';
document.all.id DIV.innerHTML = "";
document.all.id DIV.innerHTML = code;
This code work if inside the Div there isn't a table, if inside the
div exists a table an error ocur: "Untermiate d string"
Anybody know hoy can i fix this?
Thanks,
Alejandro
I need to insert some code (for example the beggining of a table)
before the code inside of a div, and some other code (for exaple the
end of a table) after the code inside of a div. Here is an example:
Actual code:
<body>
<div id="idDIV">
<table>
<tr>
<td>Some text</td>
</tr>
</table>
</div>
</body>
I want to make the code above like this:
<body>
<div id="idDIV">
<table>
<tr>
<td>
<table>
<tr>
<td>Some text</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
I'm trying to do this with this code:
var code = '<table><tr><td >'+document.all .idDIV.innerHTM L+'</td></tr></table>';
document.all.id DIV.innerHTML = "";
document.all.id DIV.innerHTML = code;
This code work if inside the Div there isn't a table, if inside the
div exists a table an error ocur: "Untermiate d string"
Anybody know hoy can i fix this?
Thanks,
Alejandro
Comment