***** ALERT - Nominations for your new ClubCJ Committee can be made here *****

Code help..

Start a Topic! Have Your Say & Talk About Anything.

Moderators: Moderators, Senior Moderators

User avatar
Graham
Post Monster
Post Monster
Posts: 3021
Joined: Mon May 18, 2009 6:08 pm
Location: Perth

Code help..

Postby Graham » Tue Dec 01, 2009 9:19 pm

Howdy all,

I've been having some problems with some code, or finding some code!

What I'm trying to do for a project site at work is basically have a header file, a menu file and an index file.

The header & menu files will be shown on all pages and the index file will be unique for each page, this way I only need to update the menu/header once instead of many many more times on each index.html file.

I've googled and googled and googled but can't find much apart from turning on settings on hosting sites but I'm trying to start this from scratch starting with HTML.

Has anyone got any example code of something basic such as a index.html file with a menu on the left hand side, a header up the top and the body which fits in nicely?

Much appreciated, thanks!
Four wheels move the body, two wheels move the soul.
ImageImage
Daily Driver: Yamaha R1
Weekend Warrior: BMW Z4 Roadster

User avatar
The X
INACTIVE Member Account
Posts: 6769
Joined: Mon Aug 31, 2009 10:41 am
Location: Pyrmonia! Inner Sydney.
Contact:

Postby The X » Tue Dec 01, 2009 9:59 pm

I think what you might be after is "frames"?
"the quieter you become, the more you are able to hear"
More pix @ http://clubcj.net/viewtopic.php?t=8779
ImageImage

User avatar
Aspired
Lancer Ralliart
Lancer Ralliart
Posts: 682
Joined: Tue Jun 23, 2009 11:11 pm
Location: Melbourne, VIC, Australia

Postby Aspired » Tue Dec 01, 2009 10:15 pm


User avatar
Graham
Post Monster
Post Monster
Posts: 3021
Joined: Mon May 18, 2009 6:08 pm
Location: Perth

Postby Graham » Tue Dec 01, 2009 10:27 pm

Thanks guys i'll have a look at it tomorrow at work when it's quiet

I don't know much at all about php so that'd be a fail for me but I'll check out frames :)
Four wheels move the body, two wheels move the soul.

ImageImage
Daily Driver: Yamaha R1
Weekend Warrior: BMW Z4 Roadster

User avatar
draevon
Lancer Ralliart
Lancer Ralliart
Posts: 689
Joined: Fri Oct 23, 2009 9:09 am
Location: Brisbane
Contact:

Postby draevon » Wed Dec 02, 2009 7:44 am

Frames for sure, although less and less site use them these days ... they don't play so well with searchengine spiders and the like:

<html>
<head>

</head>
<frameset cols="180,*" border="0">
<frame src="menu.htm" noresize scrolling="no">
<frameset rows="60,*" border="0">
<frame src="top.htm" noresize scrolling="no">
<frame src="page.htm" name="main" border="0">
</frameset>
</frameset>
</html>
.
Image
GReddy Spectrum Elite Exhaust - TEIN S.Tech Springs - Injen CAI- 3D Eyelids - Carbon Fiber Interior - Pivot Shift Light - Smoked LED Taillights - Carbonout & Debadge.

User avatar
Chubb
Post Monster
Post Monster
Posts: 2615
Joined: Fri Oct 16, 2009 8:04 am
Location: Uralla, NSW, Australia

Postby Chubb » Wed Dec 02, 2009 8:57 am

Like draevon said frames are being used less today, an alternative that I like to use are DIV blocks as you can do any thing you like with them.

Razoxane
Lancer Newbie
Lancer Newbie
Posts: 28
Joined: Sat Aug 15, 2009 6:01 pm
Location: Sydney, NSW

Postby Razoxane » Tue Dec 15, 2009 10:08 pm

You might want to try some AJAX - Asynchronous Javascript and XML. There are heaps of tutorials around, and when I'm at work tommorrow (off the iPhone which is crap for finding example links!) I'll post some good ones.

Basically, you have one HTML page consisting of the menu, and on all other pages, a chunk of JavaScript which sucks the content of that page and dumps it into a div.

Does your hosting providor support PHP and/or ASP? Ideally, you'd use a content management system, which would build menus automatically, but that can be a pain to set up.


Return to “General Talk”

Who is online

Users browsing this forum: No registered users and 76 guests