Page 1 of 1

Loading different content into Main content

Posted: Sun Sep 14, 2014 1:44 pm
by kydude1957
Where would you put the code in the html below to switch content using the nav buttons. I posted earlier where I had split up my code and used includes for the header, nav, main and footer. Since I cannot get that to work correctly to show the html in the browser I would like to go ahead and use what is below. Any help is appreciated in advance.

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link href='Styles/layout.css' rel='stylesheet'>
<title>Austen Robinson</title>
<meta name="generator" content="Notepad ++">
</head>
<body>

<div class='wrapper'>

<div class='header'></div>

<div class='navbar'>
<div class='button'><a href='index.php'>Home</a></div>
<div class='button'><a href='index.php?page=resume'>Resume</a></div>
<div class='button'><a href='index.php?page=portfolio'>Portfolio</a></div>
<div class='button'><a href='index.php?page=contact'>Contact Me</a></div>

</div>

<div class='mainbody'>
</div>

<div class='footer'>Austen Robinson  &copy  2014  Austen Robinson Web Design and Development</div>

</div>

</body>
</html>

Re: Loading different content into Main content

Posted: Sun Sep 14, 2014 1:47 pm
by kydude1957
resume, portfolio and contact would of course be put into the home container.

Re: Loading different content into Main content

Posted: Sun Sep 14, 2014 5:37 pm
by requinix
Assuming you don't mean to switch based on regular links but something AJAXy, you'd put that in some Javascript code, in a file, that you pull in with a <script>.

No idea what the "home container" is.