Is it possible to just refresh a table?

liunx

Guest
Is it possible to just refresh a table on a page instead of the whole page?<!--content-->I dont believe so.<!--content-->that sucks<!--content-->Actually, if you place the table in a DIV you can then reset the contents of the DIV:<br />
<br />
<br />
<br />
function tableRefresh(){<br />
tableDiv.innerHTML="<table><br />
<tr><td>Cell 5</td><td>Cell 6</td></tr><br />
<tr><td>Cell 7</td><td>Cell 8</td></tr><br />
</table>";<br />
}<br />
<br />
...<br />
<div id="tableDiv"><br />
<table><br />
<tr><td>Cell 1</td><td>Cell 2</td></tr><br />
<tr><td>Cell 3</td><td>Cell 4</td></tr><br />
</table><br />
</div><br />
<button onclick="tableRefresh()">Table Refresh</button><br />
...<!--content-->You could put the table on its own page and include that page in your top level page using the Inner Browsing techniques described in an article at <!-- m --><a class="postlink" href="http://devedge.netscape.com">http://devedge.netscape.com</a><!-- m --> .<!--content-->I'm using asp.net with VB.....I'm not getting any errors except for the yellow triangle on the bottom left of the page saying done but with errors.<br />
<br />
<script runat="server"><br />
Dim tablediv<br />
Sub tablerefresh(Sender as Object, e as EventArgs)<br />
<br />
tablediv.innerhtml="<table><tr><td>Cell 5</td><td> Cell 6</td></tr><tr><td>Cell 7</td><td> Cell 8</td></tr></table>"<br />
End Sub<br />
</script><br />
<html><br />
<br />
<head><br />
<title> Login-Aspx </title><br />
</head><br />
<br />
<body background="grback.jpg"><br />
Experimental table refresh:<br><br />
<div id="tablediv"><br />
<table><br />
<tr><td>Cell 1</td><td> Cell 2</td></tr><br />
<tr><td>Cell 3</td><td> Cell 4</td></tr><br />
</table><br />
</div><br />
<button onserverclick="tablerefresh" runat="server">Table Refresh </button><!--content-->The innerHTML property is case sensative...<!--content-->Much as I despise frames, you could put the table in a frame...........<!--content-->I have been using JavaScript to dynamically build tables. I have a page that I load once. The table is defined in the HTML as:<br />
<br />
<table id="statstable"><br />
<tbody><br />
</tbody><br />
</table><br />
<br />
its proberties are defined by CSS.<br />
<br />
When the user clicks the "Display Data" button on the page, the table's rows are inserted. On the first insert, the header is also inserted. On subsequent clicks, the old rows are removed and new rows are inserted. The number or rows inserted can vary each time.<br />
<br />
Let me know if you would like to see the JavaScript code needed to do this.<!--content-->NO NO NO frames....I won't go back! anyway I'm still getting an error even by changing to the correct case of innerHTML. Any other ideas?<!--content-->Ok, I figured out the refreshing the table part but how could I use this to maybe load an external page into and be able to run my scripts inside of the table?<!--content-->
 
Back
Top