inserting html into html

I created a website in photoshop sliced it up and saved for web. I want this one page to be the stationary page for the whole site meaning it never gets refreshed or changed. Instead, I sliced a cutout in this page that I want all the current web content to be located in. So I basically want to edit 5 simple html files and have them pulled into the cutout on the main page.

I also would like my links on the main page to be able to call each of these 5 html files when clicked.

I've played a little with server side includes but also want this html within the cutout to scroll instead of stretching the main site out of wack when there's too much content in it.

Is there possibly a javascript answer to this?
coffeebrandyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

remorinaCommented:
Have you tried using a frameset?
You can use frameset and call the links to update the content frame with your html pages

A simple example can be found here http://www.yourhtmlsource.com/examples/frameset1.html clicking the links to the left will update the right frame

More info http://www.w3schools.com/html/html_frames.asp
0
Chris StanyonWebDevCommented:
You could also use iframes instead of a frameset, and set your links to  target the iframe,

<a href="page2.html"  target="myFrame">Page 2</a>

<iframe src="page1.html" name="myFrame" style="width:400px; height:300px;">
  <p>Your browser does not support iframes.</p>
</iframe>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HicanCommented:
You could use php / javascript to do this and fill up a div. "Just" use a small javascript to fill the content div, like in the code below, to replace the lorem ipsum text with the content matching the menu links. Because it has a overflow: auto, it will stay within the given height of the element and not 'mess up' your page.



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Test</title>
<style>
.wrapper
{
 width: 500px;
 margin: 0 auto;
}
.content
{
 width: 500px;
 height: 200px;
 float: left;
 border: black 1px solid;
 overflow: auto;
}
</style>
<body>
<div class="wrapper">
  <div class="content">
  		 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has 
			 been the industry's standard dummy text ever since the 1500s, when an unknown printer took a 
			 galley of type and scrambled it to make a type specimen book. It has survived not only five 
			 centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It 
			 was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum 
			 passages, and more recently with desktop publishing software like Aldus PageMaker including 
			 versions of Lorem Ipsum.<br />
			 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has 
			 been the industry's standard dummy text ever since the 1500s, when an unknown printer took a 
			 galley of type and scrambled it to make a type specimen book. It has survived not only five 
			 centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It 
			 was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum 
			 passages, and more recently with desktop publishing software like Aldus PageMaker including 
			 versions of Lorem Ipsum.<br />
  </div>
</div>
</body>
</html>

Open in new window

0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

MsMissCommented:
I would use iframes for what you are tying to achieve here.  To further understand iframes, check out this page:

http://www.iframehtml.com/

It will break it down easily for you.
0
coffeebrandyAuthor Commented:
Thanks Chris and Ms,
I went with Iframes and it was actually pretty easy. Now I just gotta get my links to call these frames.
0
Chris StanyonWebDevCommented:
Give your iFrame a name, like so

<iframe src="page1.html" name="myFrame" style="width:400px; height:300px;">

And then 'TARGET' that frame within your links:

<a href="page2.html"  target="myFrame">Page 2</a>
0
coffeebrandyAuthor Commented:
I chose iframes although I've read that frames are really not the way to go now days.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.