Click to See Complete Forum and Search --> : Click button to change data in a table.


MatrixDancer
03-13-2003, 11:04 AM
I have a page where the only information that changes from page to page it the data in one cell of a table. In This cell I have a <div> with the information in it. As it standa right now, clicking on a nav button reloads a whole new page. What i want is that when the user clicks the button, the data in the table changes to the new page's data. How can I do this.

AdamBrill
03-13-2003, 11:14 AM
Give the div an ID and then do it like this:

document.getElementById('divID').innerHTML="whatever";

That should work for you. The only problem with this method is that it doesn't work if they don't have JavaScript...

pyro
03-13-2003, 11:23 AM
Here is a better way to do it, if your server supports PHP...

http://www.infinitypages.com/research/divinclude.php

or, the client side method:

http://www.infinitypages.com/research/clientsidedivinclude.htm