Click to See Complete Forum and Search --> : Opening a page within a table?
Iconoclast
03-01-2003, 03:09 PM
Hi there, I have a webpage that's divided into three "sections."
There are a set of tables on the left, the middle, and on the right. Now, the table in the middle, I need to be able to put my news updated inside.
Is there a way for me to open an HTML page inside of the middle without it messing up either of the three tables?
Sorry if I'm unclear. Here's a breakdown. This is a game site. Menus on the left and right and in the middle is the news section. I use a program called Coranto to update the news and need Coranto's output page displayed in the middle. I can't seem to code it right and I need some help.
Stefan
03-01-2003, 03:14 PM
Use an <iframe>
and btw, don't abuse <table> for general site layout, use CSS which was designed to do layout.
Iconoclast
03-01-2003, 03:17 PM
Thanks.
Well the thing is about an iframe is that I don't want the news to be inside of a scrollable box, I want it to expand down the main page. Similar to that of http://acvault.com (the news setup only)
Iconoclast
03-01-2003, 03:23 PM
http://iconoclast.0ldsk00l.net/images/apic.gif
Not sure I'm totally clear on what you need, but it sounds like you need some server side programming to include your page...
If your server supporst php, you can do it like this:
rename to .php
<?PHP
include("yourfile.php");
?>
or Server Side Includes:
rename to .shtml
<!--#include file="yourfile.htm"-->
Iconoclast
03-01-2003, 03:34 PM
Yeah, that'll work. Thanks. =)
If PHP is an option, I'd recommend that method first, because you will be able to add far more to your site with PHP. PHP is far more powerful than SSI, so you'd be best of useing that...
Iconoclast
03-01-2003, 03:39 PM
Hmm, well I'm probably the most inept webmaster you've ever met, I can't seem to get it in right. =( hehe (with SSI)
Can't do PHP until the admin gets back from vacation.
Iconoclast
03-01-2003, 03:42 PM
Here's the area it needs to be in:
<TD background="images/back.gif"><font face=verdana size=2 color=#C2BB8E><b>town crier:</b></font></TD>
<TD BGCOLOR=#063017> </TD>
<TD BGCOLOR=#063017> </TD>
<TD BGCOLOR=#063017> </TD>
</TR>
</TABLE>
</td>
</tr>
</table>
<TABLE WIDTH=100% BGCOLOR=#FFFFFF BORDER=0 CELLPADDING=4 CELLSPACING=2>
<TR>
<!-- put newspro above this -->
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
http://xlt97.20megsfree.com/apic.gif
(Copy and paste)
Make sure your name your file with a .shtml ending, then try:
<TD background="images/back.gif"><font face=verdana size=2 color=#C2BB8E><b>town crier:</b></font></TD>
<TD BGCOLOR=#063017> </TD>
<TD BGCOLOR=#063017> </TD>
<TD BGCOLOR=#063017> </TD>
</TR>
</TABLE>
</td>
</tr>
</table>
<TABLE WIDTH=100% BGCOLOR=#FFFFFF BORDER=0 CELLPADDING=4 CELLSPACING=2>
<TR>
<!--#include file="yourfile.htm"-->
<!-- put newspro above this -->
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>Also, remember that yourfile.htm does _not_ include elements such as <html> etc, as the contents of the file will just be added to your .shtml file.
Iconoclast
03-01-2003, 03:48 PM
I had <!--#include file="http://myaddress.com/cgi-bin/news/news.txt"--> and had changed it (the main page) to .shtml then when I refreshed, it remained the same. The problem is most likely just because of my ignorance. =P
Does your server support SSI? It possibly does not... Try the PHP method.
Iconoclast
03-01-2003, 03:57 PM
I owe you guys my first-born child! Thanks so much!
Iconoclast
03-01-2003, 04:04 PM
Too good to be true. =( Now I have another problem for you two wise-men to solve:
<TD background="images/back.gif"><font face=verdana size=2 color=#C2BB8E><b>town crier:</b></font></TD>
<TD BGCOLOR=#063017> </TD>
<TD BGCOLOR=#063017> </TD>
<TD BGCOLOR=#063017> </TD>
</TR>
<?PHP
include("http://xxx.net/cgi-bin/news/news.txt");
?>
</TABLE>
</td>
</tr>
</table>
<TABLE WIDTH=100% BGCOLOR=#FFFFFF BORDER=0 CELLPADDING=4 CELLSPACING=2>
<TR>
<!-- put newspro above this -->
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
With where I put that, it totally unaligned the tables on the right, now they're higher than they should be. What should I do?
Hehehe, I feel like a kid again.
Originally posted by Iconoclast
What should I do?Post a link so we can see the problem... ;)
Iconoclast
03-01-2003, 04:20 PM
The Battered Anvil (http://iconoclast.0ldsk00l.net/index2.php)
Well, it looks ok to me in IE6...what is it supposed to look like? A screen shot, or something would be nice, if possible...
Iconoclast
03-01-2003, 04:39 PM
http://xlt97.20megsfree.com/apic.gif
Copy and paste that. The server doesn't like remote linking.
Ignore the big white box in the middle.
If you have that working somewhere besides a .gif (ie. an actuall HTML page) then all you should need to do is remove the main content cell, and insert that code into the news.txt file.
Iconoclast
03-01-2003, 04:44 PM
Other than that photoshopped white-box in the middle, that's what the page looked like before I put in the PHP, since I've put in the PHP, it's unaligned the tables on the site and I'm not sure how to fix it.
Sorry if I was unclear before.
The PHP shouldn't be changing your site at all. You probably added your include in the wrong spot, or something, because if you simple took the main content cell, put it in news.txt and added a php include file, when you viewed source after the server parsed it, it would look exactly the same.
Iconoclast
03-01-2003, 04:50 PM
I meant the PHP tag itself and I was trying to figure out where to place it. :D
Iconoclast
03-01-2003, 04:52 PM
Problem is fixed guys. Thanks a lot! I hope my stupidity didn't rub off on ya! :D