Jump to content
xisto Community
Sign in to follow this  
switch

Integrating One Html File Into Another without embedding

Recommended Posts

Extract some html from one site, to display on another via code?Integrating One Html File Into Another

Okay, I accept a few things already.  One, this may be insanely hard to impossible.  Two: It is complicated to explain.I'm trying my best to keep several sites up to date, with several things ranging from schedule, to practice times, etc.  The 'Master site' where I place a large chunk of (sometimes all of it) data, is one step.  But then I have to take the appropriate bits and move them to their respective sites as well.I'm trying to find out of there is a way to extract/snip/look at a specific section of my master site, using code located on the secondary site(s), so I only have to update one of them, and the others fall in place as well.This would cut about 30 minutes to an hour off my average time updating stuff.

-reply by David

Share this post


Link to post
Share on other sites
Menu run from html page on CD, (not using a server)Integrating One Html File Into Another

Hi Jerry,

Sorry this reply is after Christmas,

1. I guess you could try and incorporate an <iframe> into the page to display the menu on the left which would load your menu contained in a seperate html file?

2. Or the other option would be to use javascript, (document.Write) to write the html code for the menu and put that in an external .Js file that each of your actual pages would load. So if you had two <div>'s the script tag with the .Js location would go in the left <div>.

ie.

HTML:

<link rel="stylesheet" type="text/css" media="all" href="location/menu.Css"/> </head><div id="menu"><script type="text/javascript" src="location/menu.Js"></script></div><div id="mainContent">All of your actual content for the page</div>

CSS:

menu {Float: left;Width: x px;Etc...}MainContent {Float: right;Width: x px;Etc...}

JS:

document.Write(" HTML CODE FOR ACTUAL CONTENT OF PAGE LINE 1 ");document.Write(" HTML CODE FOR ACTUAL CONTENT OF PAGE LINE 2 ");document.Write(" HTML CODE FOR ACTUAL CONTENT OF PAGE LINE 3 ");document.Write(" HTML CODE FOR ACTUAL CONTENT OF PAGE LINE 4 ");Etc...

With both options you would probably style the menu using CSS contained in a seperate .Css file.

A problem you might find with both of these options is the extra security implemented when loading webpages stored on your local hard disk or CD that may restrict Javascript or iframe usage for the user? Although as you've created CDs before I'm sure you come across these problems before!

Hope this helps..

Mark

-reply by Mark

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.