Using frames?

  • manytopsites
  • Newbie
  • Newbie
  • manytopsites
  • Posts: 12

Post 3+ Months Ago

Hi was wondering about maybe using frames on my site as it would solve a few problems, but is frames really such a bad thing and are there any alternatives?
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

yes there are alternatives which are much better
CSS:
Code: [ Select ]
div.frametype
{
width:100px;
height:100px;
overflow:auto;
border:1px black solid;
}
  1. div.frametype
  2. {
  3. width:100px;
  4. height:100px;
  5. overflow:auto;
  6. border:1px black solid;
  7. }
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Perhaps it would be beneficial to know what problems you are trying to solve that prompts you to consider using frames, before we give you a bunch of useless answers.
  • manytopsites
  • Newbie
  • Newbie
  • manytopsites
  • Posts: 12

Post 3+ Months Ago

ok, i want the navigation on my site to be easier so i want a frame with content that can scroll down on, and a navbar on the left, frames would be better as i have over 100 pages of content and i dont want to code each page with the same navbar in them
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Understandable. I suspected that might be why. Do some searching for Javascript Navigation Menus. Basically, you create your menu with Javascript (typically in one file), then simply include the "place holder" code on each page where the menu would go.

Then in the future when you need to make menu changes, you simply edit the one javascript file and all your pages update with the changes.

Just type Javascript Navigation Menu or DHTML menu into Google, and you'll have plenty to choose from.
  • manytopsites
  • Newbie
  • Newbie
  • manytopsites
  • Posts: 12

Post 3+ Months Ago

Yea thats exactly what i would need , saves me alot of time thank you
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

Or you can use a simple PHP include if you don't want javasciprt considering it can be turned off...

Make a CSS (or any type of menu you like) and include it into the spot on the page you like... (DO NOT ADD <HTML---</HTML> JUST THE MAIN CODE TO DISPLAY THE MENU). And then you can use the following PHP code to include it into your pages...

PHP Code: [ Select ]
<?php include_once('menu.html'); ?>


The only thing about it is that your server needs PHP enabled since PHP is a server side script and the extension of the web document that has the PHP code has to be *.php. No real PHP programming skills needed for that.
  • manytopsites
  • Newbie
  • Newbie
  • manytopsites
  • Posts: 12

Post 3+ Months Ago

Yea i have php and mysql running on my server,i tried to include a page into the original one as you said but it got kinda messed up, was somewhat harder then i though at first getting all this right, as im trying to code it into a php file that i didnt code... but i am going to try some more..
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

What is the code for the page you wanted to include?

Don't put the main skeleton tags in the included file (the menu in this case...) (skeleton tags are... <html><head><title>...</title></head><body> ... </body></html>) (just for FYI).
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

FYI bogey, when was the last time you or anyone else you know disabled javascript? Only people I know that typically disable javascript are people that attempt to download cracked software from relatively bogus sites.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

ATNO/TW wrote:
FYI bogey, when was the last time you or anyone else you know disabled javascript? Only people I know that typically disable javascript are people that attempt to download cracked software from relatively bogus sites.


I was just saying that it could be disabled
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

ATNO/TW wrote:
FYI bogey, when was the last time you or anyone else you know disabled javascript? Only people I know that typically disable javascript are people that attempt to download cracked software from relatively bogus sites.


This might sound dumb, but why would someone disable Javascript for that reason?
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

Bogey wrote:
What is the code for the page you wanted to include?

Don't put the main skeleton tags in the included file (the menu in this case...) (skeleton tags are... <html><head><title>...</title></head><body> ... </body></html>) (just for FYI).


That's good to know. I think I'm going to try using php includes for my menus on the next site I build. It's gonna be a big one with lots of pages, so I figure it would be a good use.

So, if I wanted to include a menu, I would just save a separate file something like this:

Code: [ Select ]
<ul>
<li>menu button 1</li>
<li>menu button 2</li>
<li>menu button 3</li>
</ul>
  1. <ul>
  2. <li>menu button 1</li>
  3. <li>menu button 2</li>
  4. <li>menu button 3</li>
  5. </ul>


Then call it menu.htm and put this line where I want the menu to go:

Code: [ Select ]
<?php include_once('menu.htm');?>


Also, I have to save every page that uses that include with a php extension, right?
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6252
  • Loc: Seattle, WA

Post 3+ Months Ago

jameson5555 wrote:
Also, I have to save every page that uses that include with a php extension, right?

If your server is configured like most typical ones, yes.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8413
  • Loc: USA

Post 3+ Months Ago

jameson5555 wrote:
Bogey wrote:
What is the code for the page you wanted to include?

Don't put the main skeleton tags in the included file (the menu in this case...) (skeleton tags are... <html><head><title>...</title></head><body> ... </body></html>) (just for FYI).


That's good to know. I think I'm going to try using php includes for my menus on the next site I build. It's gonna be a big one with lots of pages, so I figure it would be a good use.

So, if I wanted to include a menu, I would just save a separate file something like this:

Code: [ Select ]
<ul>
<li>menu button 1</li>
<li>menu button 2</li>
<li>menu button 3</li>
</ul>
  1. <ul>
  2. <li>menu button 1</li>
  3. <li>menu button 2</li>
  4. <li>menu button 3</li>
  5. </ul>


Then call it menu.htm and put this line where I want the menu to go:

Code: [ Select ]
<?php include_once('menu.htm');?>


Also, I have to save every page that uses that include with a php extension, right?


Yes for every one of them

Post Information

  • Total Posts in this topic: 15 posts
  • Users browsing this forum: No registered users and 42 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.