PDA

View Full Version : Help with tables


AlienSkater23
08-24-2002, 05:37 AM
Is it possible so that when you click on a link in one section of the table it loads data into one of the other sections. as you can tell im new to this.

Does it work just like a frame does using the target attribute? If so where would i place the target attribute?

Thanks for your help!

Chris

The Wizzard
08-24-2002, 05:44 AM
No, not with tables, but you could insert an iframe into a table, and have data loaded into that...

<IFRAME SRC="hello.html" WIDTH=450 HEIGHT=100></IFRAME>

AlienSkater23
08-24-2002, 05:45 AM
thanks ill try that right now

sjc_unique
08-24-2002, 05:43 PM
you would be able to what you are looking for using PHP. The coding for it is quite simple (as i found out this week), but your host would need to support PHP. let me know if u need any help.

SJC

duniyadnd
08-24-2002, 07:11 PM
hmmm... sjc_unique, i'm actually curious on how php would help in this scenario.

duniyadnd

sjc_unique
08-24-2002, 07:46 PM
ok, well:

add the following code into your <td> cell

<?php
if(!isset($_GET['aVar']))$page="noinfo";
else $page=$_GET['aVar'];
include("$page.php");
?>

then if you have a link, set it up as so.....

<a href="index.php?aVar=news1">LINK</a>

where:
index.php is the page you are working on
news1 is the page that the new code is on (saved as news1.php)

The above can of course be changed.

You also need to save a blank noinfo.php page, which will be displayed when no link is clicked.

Hope i've explained it well enough. if not let me know.

SJC

Kang He
08-24-2002, 11:09 PM
sjc, I don't think PHP is applicable at the moment, as the question regards how to keep the page static while the content dynamic.

My answer would be to use frames, either normal ones or i-frames.

sjc_unique
08-24-2002, 11:12 PM
2 points Kang He.

where does she ask to "keep the page static while the content dynamic"?

and 'duniyadnd ' asked about it, and i was replying to his question.

SJC

Kang He
08-25-2002, 09:32 PM
He or she wants to load the content in a different "table"..

sjc_unique
08-26-2002, 10:34 AM
Kang He. do u know any PHP?

You can allocate whatever <td> you like for this information to be called into.