If you already have the two tables in that screen you can simply make one of them invisible using CSS style="display:none"
and use javascript to access them and switch the display attribute between them each time you want to swap.
javascript code to switch would be
document.getElementById("elementID").style.display=''; (to show)
document.getElementById("elementID#2").style.display='none'; (to hide)
1
solved Swap out html table for new table [closed]