displaying the contents of an html file in a table

This is a discussion on displaying the contents of an html file in a table within the Tech Board forums, part of the Community Boards category; I use a table to help the layout of my website, and in one of the columns, I have links ...

  1. #1
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916

    displaying the contents of an html file in a table

    I use a table to help the layout of my website, and in one of the columns, I have links to the various parts of the website. This is on every page. When I add a new portion, I currently have to update the links on every page. Is there a way to just store all the links in a seperate html file and then display that file in the column, and then display the rest of the original file?

    http://confuted.webhop.org/ if what I just said wasn't clear
    Away.

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    You could use a php or cgi script to read your link information from one file, and display it on whatever page the user's put up. The http://contests.cprogramming.com web page does that with its links. (Not everywhere on the cprogramming.com site, though.)

    Or, you could put that into a seperate frame.
    Last edited by ygfperson; 08-02-2003 at 11:57 AM.

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Use server side includes. You just need to know what web server you're running under, then look in the documentation for SSIs
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    I think frames might be your best bet.

    Here is a small example

    Index.html
    Code:
    <center><img href="PrettyGraphic.ext"><br><br>
    
    <a href="front.htm">Enter</a>
    LEFT WINDOW(left.htm)
    Code:
    <font size=4><u>Navigation</u></font><br><br>
    
    LINKS<br>
    <a href="games.htm" target="main">Games</a><br>
    MAIN WINDOW(main.htm)
    Code:
    <center>Startup Page
    PAGE TO DISPLAY BOTH(front.htm)
    Code:
    <frameset cols="15%,*" frameborder="0" framespacing="0" border="0">
    <frame name="left" src="left.htm" marginwidth="3" marginheight="10" scrolling="no">
    <frame name="main" src="main.htm" marginwidth="5" marginheight="10">
    </frameset>
    The right frame, is for content, and the left frame is for links. Create a new page, and put some babbling in it. Put the filename inside of a link, in left htm. Make sure to point this link, that is opening the new file, towards the main window, like so:
    Code:
    <a href="games.htm" target="main">Games</a>
    The world is waiting. I must leave you now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 04:02 AM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Replies: 3
    Last Post: 03-04-2005, 01:46 PM
  5. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21