Link to home
Start Free TrialLog in
Avatar of coffeebrandy
coffeebrandy

asked on

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?
Avatar of remorina
remorina
Flag of Australia image

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
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of coffeebrandy
coffeebrandy

ASKER

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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I chose iframes although I've read that frames are really not the way to go now days.