Calmaris
01-08-2004, 12:53 PM
Is it possible to just refresh a table on a page instead of the whole page?
|
Click to See Complete Forum and Search --> : Is it possible to just refresh a table? Calmaris 01-08-2004, 12:53 PM Is it possible to just refresh a table on a page instead of the whole page? soccer362001 01-08-2004, 01:09 PM I dont believe so. Calmaris 01-08-2004, 01:10 PM that sucks TheBearMay 01-08-2004, 01:32 PM Actually, if you place the table in a DIV you can then reset the contents of the DIV: function tableRefresh(){ tableDiv.innerHTML="<table> <tr><td>Cell 5</td><td>Cell 6</td></tr> <tr><td>Cell 7</td><td>Cell 8</td></tr> </table>"; } ... <div id="tableDiv"> <table> <tr><td>Cell 1</td><td>Cell 2</td></tr> <tr><td>Cell 3</td><td>Cell 4</td></tr> </table> </div> <button onclick="tableRefresh()">Table Refresh</button> ... ray326 01-08-2004, 01:34 PM 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 http://devedge.netscape.com . Calmaris 01-08-2004, 11:54 PM 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. <script runat="server"> Dim tablediv Sub tablerefresh(Sender as Object, e as EventArgs) tablediv.innerhtml="<table><tr><td>Cell 5</td><td> Cell 6</td></tr><tr><td>Cell 7</td><td> Cell 8</td></tr></table>" End Sub </script> <html> <head> <title> Login-Aspx </title> </head> <body background="grback.jpg"> Experimental table refresh:<br> <div id="tablediv"> <table> <tr><td>Cell 1</td><td> Cell 2</td></tr> <tr><td>Cell 3</td><td> Cell 4</td></tr> </table> </div> <button onserverclick="tablerefresh" runat="server">Table Refresh </button> TheBearMay 01-09-2004, 07:38 AM The innerHTML property is case sensative... clairec666 01-09-2004, 07:40 AM Much as I despise frames, you could put the table in a frame........... ccoder 01-09-2004, 08:59 AM 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: <table id="statstable"> <tbody> </tbody> </table> its proberties are defined by CSS. 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. Let me know if you would like to see the JavaScript code needed to do this. Calmaris 01-09-2004, 03:31 PM 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? Calmaris 01-29-2004, 06:54 AM 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? webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |