470,631 Members | 1,690 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,631 developers. It's quick & easy.

Beginner Q

I have a beginner question. I'm working on a page which is using
frames; basically there is the main "window" and a side-bar, each of
which is a separate frame. I was wondering if there was some way to
"link" these frames such that scrolling the main page would also scroll
the sidebar?

If not, is there someway to setup the page as a table, and "call" the
HTML code for the sidebar from a second HTML file?

The reason I want to do this is that the sidebar will be frequently
updated, and I don't want to have to change code on dozens of pages
every time the sidebar code changes.

Thanx

Bryan
Dec 5 '06 #1
3 1301
Bryan Heit <bj****@NOSPAMucalgary.cawrote:
>I have a beginner question. I'm working on a page which is using
frames
http://allmyfaqs.net/faq.pl?Problems_with_using_frames
>If not, is there someway to setup the page as a table, and "call" the
HTML code for the sidebar from a second HTML file?
http://allmyfaqs.net/faq.pl?Include_one_file_in_another

--
Spartanicus
Dec 5 '06 #2
Bryan Heit <bj****@NOSPAMucalgary.cawrote in
news:el**********@news.ucalgary.ca:
I have a beginner question. I'm working on a page which is using
frames; basically there is the main "window" and a side-bar, each of
which is a separate frame. I was wondering if there was some way to
"link" these frames such that scrolling the main page would also
scroll the sidebar?
Sure. Do away with frames that have problems associated with them.
If not, is there someway to setup the page as a table, and "call"
the HTML code for the sidebar from a second HTML file?
Tables are no use either, they should only be used for tabular data.
The reason I want to do this is that the sidebar will be frequently
updated, and I don't want to have to change code on dozens of pages
every time the sidebar code changes.
There are several ways to include one file in another so that you will
only need to update one. Find out if the host your page is on has SSI
(Server Side Includes) available. I don't remember the syntax off hand
as I do it using php. A Google search on SSI or includes should get
you that syntax.

If no SSI, how about php? It's a fairly simple to learn programming
language that allows you to place code in web pages; your pages must
have a php extension rather than html so that the server knows to
process using php. Then, in your HTML (php now) file, you insert:
"<?php include('nav.php') ?>" where your navigation begins, assuming
your sidebar contains navigation. nav.php is the file name that you
wish to include; the php extension on this file is not necessary but I
usually keep it as that because most of my included files also contain
php.
Thanx

Bryan


--
Stan McCann, RETIRED!!, "Uncle Pirate" http://stanmccann.us/
Implementing negative score for googlegroup postings, see
http://blinkynet.net/comp/uip5.html
A zest for living must include a willingness to die. - R.A. Heinlein
Dec 5 '06 #3
Spartanicus wrote:
Bryan Heit <bj****@NOSPAMucalgary.cawrote:
>I have a beginner question. I'm working on a page which is using
frames

http://allmyfaqs.net/faq.pl?Problems_with_using_frames
>If not, is there someway to setup the page as a table, and "call" the
HTML code for the sidebar from a second HTML file?

http://allmyfaqs.net/faq.pl?Include_one_file_in_another

Thanx for the advice. The HTML preprocessor did the trick!

Bryan
Dec 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Richard B. Kreckel | last post: by
8 posts views Thread by Grrrbau | last post: by
7 posts views Thread by Rensjuh | last post: by
27 posts views Thread by MHoffman | last post: by
18 posts views Thread by mitchellpal | last post: by
10 posts views Thread by Roman Zeilinger | last post: by
10 posts views Thread by hamza612 | last post: by
22 posts views Thread by ddg_linux | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.