im not sure if this would work on a table (i know it will work on a div, but lets give this a shot), but try assigning the HTML to some javascript variables and then use the innerHTML method like so:
Code:
<html>
<head>
<script>
var oldContent = "<tr><td>Old Stuff</td></tr>"
var newContent = "<tr><td>New Stuff</td><td>More Stuff</td></tr>"
function tableChange(id, old, new){
if (document.getElementById(id).innerHTML == old){
document.getElementById(id).innerHTML = new;
}
else{
document.getElementById(id).innerHTML = old;
}
}
</script>
</head>
<body>
<table id="myTable">
<tr><td>Old Stuff</td></tr>
</table>
<input type="button" value="Change Table" onClick="tableChange('myTable', oldContent, newContent)">
let me know how it goes... cheers
Bookmarks