PCTechTalkhttp://www.pctechtalk.com/forums/

Go Back   PCTechTalk > PC Tech > Operating Systems and Software > Software

Reply
 
LinkBack Thread Tools Display Modes
Old 08-29-2004, 06:17 PM   #1 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
Question Several HTML documents in One? But no FRAMES.

Hi there, I know there is an easier way to do this using asp or other malarkay like that but i just dont know it and dont have the time for it...just now.

But i was wondering if there was any easy way, using HTML, to simply link to different HTML documents ie. a header and a footer and stick them on top of and below the content of my different pages, kind of like you see with phpBB where u have the top bit always being the same for everypage and the bottom bit the same for everypage. I want to be able to do this without <IFRAME> (unless u can tell me a way of removing that stupid 'bevel' border) or using FRAMES. Id like to know of any alternatives you guys can think of.

Basically I dont want to have the same 160 lines of HTML at the top and bottom of every one of my HTML pages and having to redirect all the links to images in the header and footer depending on the location of each web page. Only the one part of my webpages change everytime (in terms of content etc.).

Is there any easy way to just make the top and bottom bit into 2 different HTML documents and then just have a 1 line piece of code that will display them on each page?


This is hard to explain but I hope some one out there can understand what im trying to get.

-KC
__________________
killer_cow is offline   Reply With Quote
Old 08-29-2004, 07:19 PM   #2 (permalink)
AdMiN oF RoCk!
 
RipperRoo's Avatar
 
Join Date: Mar 2003
Location: uk
Posts: 2,080
RipperRoo is on a distinguished road
to get a frame setup without the boarder, you just need to modify the code a little, here is an example rehashed from one of my old sites:

Code:
<frameset rows="100,*" border="0">
    <frame name="navigation" src="navigation.html" 
marginwidth="10" marginheight="10" scrolling="no" 
frameborder="0">
    <frame name="main" src="main.html" marginwidth="10" 
marginheight="10" scrolling="auto" frameborder="0">
</frameset>
frameset rows="100,*" border="0" defines the frame as a row (horizontal) without a border, and filling the whole row ( ,* )
as long as you make your header height 100 as in this example and make the background of navigation.html the same as the background to main.html you wont even see the join, example (rehashed from my old site so the menu's dont fit).

you can see where the header meets the rest of the page because of the navigation menu, but no beveled bars and an imvisable seemless join

this method also has the advantage of being able to control whether you have a scroll bar on either section or not, just set it to auto if you want ne and no if you dont.
Attached Images
File Type: jpg example.jpg (29.8 KB, 30 views)
__________________
PcTechtalk.com Admin
A7V8X xp2600 Barton SLK 97U, GeForce FX 5700, 1GB 2700DDR Ram
Sony DVD -R/+R/RW, SB Live 5.1 Digital, 1 x 30gb 3 x 200GB 2x120GB 1 x 250GB HDD'S, 19" TFT Epson R265
HP NX6125 Laptop 1gb memory

http://www.minotaur-computers.co.uk/
RipperRoo is offline   Reply With Quote
Old 08-30-2004, 04:39 AM   #3 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
and use target="framename" in your links to direct them to the right frame when you click them.
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 08-30-2004, 03:07 PM   #4 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
Ill tell u why i dont want to use frames. Because when I scroll down the pages with my content etc. i dont want everything to stay where it is apart from the content, i want the whole thing to move down so you dont have a 150pixel high header covering up the top part of ur screen all the time, just for when the page appears and then u scroll down so u can view the content and not hav a little 'window' to look at it from. See what I mean? I used to have frames in my other web pages and because i like colourful big-ish headers, i dont want the visitor to hav to look at my page through the little window of space thats left

Hope this will help bring up some ideas.
__________________
killer_cow is offline   Reply With Quote
Old 08-31-2004, 05:13 AM   #5 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
Lightbulb

Heres a thought. Do you know of any way to make an <IFRAME> that would resize itself according to how much content there is in the page [contained in the frame, of course].

i.e. Lets say the contents of my 'home' page covered 300pixels in height, but then my 'graphics' page was 800pixels long, is there anyway that I could use maybe some javascript or other language in the target page to use as a reference to the page height so the IFRAME would resize itself accordingly?

Hope you can help me out.

-KC
__________________
killer_cow is offline   Reply With Quote
Old 08-31-2004, 02:28 PM   #6 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
uhm... maybe you can define a DIV which has an URL loaded in it (that's basically what an IFRAME is). The DIV will scroll through, but I really start to feel you just need server side scripting to include a template or something; sounds a lot simpler and less intensive for the client (browser) to me.
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 09-01-2004, 03:20 AM   #7 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
Could u give me an example of some server script i could use, because i really havnt had the time to look very intensly into server-side script. I guess a template would prolly be the best bet in this instance. Any 'easy' ways of getting started that you know of?

http://www.kcstudios.co.uk/main/indexv2.html

Thats the page I've got at the moment. Any ideas?

Thanx in advance,
K-C
__________________
killer_cow is offline   Reply With Quote
Old 09-01-2004, 03:47 AM   #8 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
PHP Code:
<html>
  <head>
    <title>my title</title>
  </head>

  <body>
<?php include('myheadertemplate.html'); ?>
    Some page content after the header goes here
  </body>
</html>
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Old 09-01-2004, 06:54 AM   #9 (permalink)
Moo indeed.
 
killer_cow's Avatar
 
Join Date: Dec 2002
Location: In a grassy field :D
Posts: 140
killer_cow
Talking

Perfect Thanx greffov. Always there to help.

Cheers


K-C
__________________
killer_cow is offline   Reply With Quote
Old 09-01-2004, 09:22 AM   #10 (permalink)
Da House Nerd
 
greffov's Avatar
 
Join Date: Dec 1969
Location: One CPU Lane
Posts: 3,512
greffov will become famous soon enough
yer welcome
__________________
Linux virusscanner detected a virus:
Windows 95 ... delete [Y/n] y
~
~

:wq
greffov is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 12:28 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
2001 PCTechTalk