Forum Moderators: open

Message Too Old, No Replies

Embedding a web page within a page

         

Yamaha_R1

3:09 am on Apr 4, 2004 (gmt 0)

10+ Year Member



What I have, is several web pages within a site, and a common menu on the left between them.

I want the menu to show on the left hand of the page on every one. I do not want to use frames either.

I don't want to have the menus html code in EVERY page I have, so I would like to embed it some how.

When I use object/imbed it has scroll bars and a box looking window, and I don't like that. I do not want a scroll bar, and found no way or key to remove it.

What is the best way to approach this problem? I really want a common "menu" file on the site, that each page refers to. Can I java the page in some how, or use something other than embed?

digitalv

3:26 am on Apr 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll want to use a method called "server side includes". Create a file that contains the code you want to replicate from page to page.

Then, in the HTML code of one of the pages that you want this menu, you would type this:

<!-- #include file="menu.html" -->

Where "menu.html" is the name of the page that contains your code. Put that include line on every page you want to have a menu, in the place you want that menu code to load.

Depending on your server configuration, this may not work with standard .htm and .html documents - use .shtml or .asp if it doesn't.

tedster

6:12 am on Apr 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We've got lots of threads on the topic here on WebmasterWorld. Just check out this Google Search [google.com]. I think you'll be rolling right along after just a bit of research.