If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Update table cell without refreshing page

I have a site I am designing with a menu bar at the top. I don't want to use
frames but I want a similar affect using tables. When someone clicks on a
menu item it should update a cell in the table with the correct data. I was
thinking of using include files but I just can't figure out how not to
reload the whole page. At http://www.dcg3.com/home.asp they have done this
with Flash but I need a non-flash ASP page.

Re: Update table cell without refreshing page

Hi,

Well this problem is of varying difficulty depending on your browser version.
I don't know what you mean by updating a table cell with data. How much
data are we talking about? Are you intending to just write in some text
maybe an image, or are you essentially trying to load another URL into a
table cell?

For just updating a cell with some simple data (not loading another page)
-------------------------------------------------------------------------
IE 4 and up:

Very easy. Give the <TD> cell an ID. Then simply do something like this:

use a IFRAME (I think IE4 had iframes..can't be sure. But IE5 surely does).
Look that up. it's pretty simple to script. You can just give the iFrame
a name. NOT an id, a name. And then just set the target attribute of your
anchor link to point to the name of the iframe.

Netscape 4:

Oy...this one is tougher. Sorry I don't have time to write the code. But
NS4 has a similar element called an ILAYER. it has a load method of sorts
that lets you load in a URL. The trick is that the iLayer won't auto scroll.
I believe it will expand with the size of the content. So if you want a
scroller, you need to write that ILAYER inside of a standard <DIV> layer.
Set the clipping for the DIV to be of a certain size rectangle and build
your own up and down buttons to change the relative position of the ILAYER
inside the DIV relative to the 0,0 coordinate of the outer DIV.