Loading different content into Main content

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kydude1957
Forum Commoner
Posts: 31
Joined: Sun Sep 14, 2014 1:37 am

Loading different content into Main content

Post 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>
kydude1957
Forum Commoner
Posts: 31
Joined: Sun Sep 14, 2014 1:37 am

Re: Loading different content into Main content

Post by kydude1957 »

resume, portfolio and contact would of course be put into the home container.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Loading different content into Main content

Post 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.
Post Reply