Click here to get back home

how to reference an html page from another html page

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
how to reference an html page from another html page Chuck [Sbc\) 03-07-2008
Get Chitika Premium
Posted by Chuck [Sbc\) on March 7, 2008, 12:43 pm
Please log in for more thread options
I am new to html programming. I have created a web with 17 different pages.
On each page is a button menu which allow the user to switch to another page
without returning to the home page . The button menu is 40 lines long.
What I would like to do is make a new file "ButtonSub.html " which the
button menu code. I would then remove all of the button codes from each
form . Instead , I would insert a statement that would call ButtonSub.html
to create the button menu on each html.page

Clear as mud???.



Posted by Ed Mullen on March 7, 2008, 12:49 pm
Please log in for more thread options
Chuck [Sbc) wrote:
> I am new to html programming. I have created a web with 17 different pages.
> On each page is a button menu which allow the user to switch to another page
> without returning to the home page . The button menu is 40 lines long.
> What I would like to do is make a new file "ButtonSub.html " which the
> button menu code. I would then remove all of the button codes from each
> form . Instead , I would insert a statement that would call ButtonSub.html
> to create the button menu on each html.page
>
> Clear as mud???.
>
>

You can do that with a server-side include using PHP or other
technology. That's assuming your Web site's server provides PHP. This
is how I include the same menu on all pages on my site:

<div id="doc_header">
<!-- start menu HTML import-->
<?php include("./styles/menu.txt"); ?>
<!-- END menu HTML import-->
</div>

I use similar markup to put the same footer on each page.

--
Ed Mullen
http://edmullen.net
If man evolved from apes why do we still have apes?

Posted by Chuck [Sbc\) on March 7, 2008, 2:11 pm
Please log in for more thread options
Ed
I tried but I don't understand what I am to put in ("/styles/menu.txt") My
menu is contained in "ButtonSub.html"
> Chuck [Sbc) wrote:
>> I am new to html programming. I have created a web with 17 different
>> pages. On each page is a button menu which allow the user to switch to
>> another page without returning to the home page . The button menu is 40
>> lines long. What I would like to do is make a new file "ButtonSub.html "
>> which the button menu code. I would then remove all of the button codes
>> from each form . Instead , I would insert a statement that would call
>> ButtonSub.html to create the button menu on each html.page
>>
>> Clear as mud???.
>
> You can do that with a server-side include using PHP or other technology.
> That's assuming your Web site's server provides PHP. This is how I
> include the same menu on all pages on my site:
>
> <div id="doc_header">
> <!-- start menu HTML import-->
> <?php include("./styles/menu.txt"); ?>
> <!-- END menu HTML import-->
> </div>
>
> I use similar markup to put the same footer on each page.
>
> --
> Ed Mullen
> http://edmullen.net
> If man evolved from apes why do we still have apes?



Posted by Jonathan N. Little on March 7, 2008, 2:31 pm
Please log in for more thread options
Chuck [Sbc) wrote:
> Ed
> I tried but I don't understand what I am to put in ("/styles/menu.txt") My
> menu is contained in "ButtonSub.html"

Then Google is your friend:

http://www.google.com/search?hl=en&q=php+includes+tutorial&btnG=Google+Search
php includes tutorial - Google Search

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Posted by Chuck [Sbc\) on March 8, 2008, 10:08 pm
Please log in for more thread options
Jonathan
Thanks - your suggested site was perfect. I made changes to all my pages
(17) and the master menu file in just over 3 hours.
I reduced my file storage by 65%.
Thanks Again
Chuck


> Chuck [Sbc) wrote:
>> Ed
>> I tried but I don't understand what I am to put in ("/styles/menu.txt")
>> My menu is contained in "ButtonSub.html"
>
> Then Google is your friend:
>
> http://www.google.com/search?hl=en&q=php+includes+tutorial&btnG=Google+Search
> php includes tutorial - Google Search
>
> --
> Take care,
>
> Jonathan
> -------------------
> LITTLE WORKS STUDIO
> http://www.LittleWorksStudio.com



Similar ThreadsPosted
reference in html page August 20, 2004, 11:25 am
How to reference page in iframe only? February 28, 2005, 12:52 pm
Launching a page to a name reference June 17, 2008, 1:16 pm
Grammer teachers - a html page or an html page September 27, 2004, 10:53 pm
Need help creating a "Click absolutely ANYWHERE on this page" link for an HTML page with no content February 7, 2007, 5:40 pm
referencing the index.html page from another page in the same directory July 26, 2004, 12:48 am
HTML reference guide July 10, 2006, 1:31 am
HTML page January 17, 2008, 10:39 am
unicode and numeric character reference in html October 18, 2007, 4:12 pm
Amazon: "The Ultimate HTML Reference" (2008) July 14, 2008, 11:23 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap