Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell drive driver drivers email error ethernet excel firefox firefox 3 freeze hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition password problem router slow software sound trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
REAL working, valid, functional frame replacement? O_o


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
Tact's Avatar
Senior Member with 368 posts.
 
Join Date: Sep 2002
Location: California
05-Mar-2007, 03:14 AM #1
REAL working, valid, functional frame replacement? O_o
hello everyone. i need help yet again. (have pity on my noobie brain )

where to start..um....>.<

so for the past few weeks or months. while working on my friends site i've been learning a lot about validation and how to do things the right way. i learned so much, that now i'm totally pumped into completely REDOING my own personal site. yay!

but... i got stuck on the first page! O_o (curse you index!!) lol


Ok, i admit it. i love FRAMES! i still love them and use them. and i'm looking and looking and looking and reading and reading for alternatives. but they all just suck or miss the mark! (woe is me ;_; )


here is what i learned so far.


css: layout-wise. the solutions are there. this is nothing. this is easy. css all the way. woop de doo. but funciontally, it's crap. i would have to copy and paste the exact same layout like 70+ times (yes i have 70+ pages omg!) and having to manually edit the diffrent parts. defeats the purpose of frames and the original reason i chose frames to begin with. not having to reload everything. only the main content.


ssi/php/cgi/whatever: i only did little research on this. not a lot. seems like it might do what i want. but here's the question. can i use this to have like... a left menu that never moves. with links. and have a user click a link, and have that menu not reload while the main content does load?

what i have learned so far. is that there is a solution to a framed "layout" via css. and a solution to external html file within html file via ssi/php/cgi/jscript/whatever. but they don't seem to offer the power and usefulness that a simple frame can do! (from what i've seen. correct me if i'm wrong)


this is what i NEED my frame replacements to do:
----------------------------------------------------------
- a 5 "framed" layout. (header/footer,left/right, and center) with "center" being the fluid/stretchy scrollable page that holds the main content and can load any of the 70+ pages i have

- header/footer, left/right "frames" to hold links.

- have said links load pages in the center area

- have said loaded pages not reload the entire page

- be valid (transitional or strict. doens't matter to me which one. just to be valid)



so. is there a solution? very important for me that the whole page doesn't reload. if it does, it pretty much means i have to code the same layout to every page i have. (right?) that's what i don't want. the closes i got was having just a single iframe isntead of the 5 frames i currently have. but then that iframe doens't move with the page so that's no good. i do love the css layout alternative. i've seen it and was about to make it. but then i stopped myself when i thought.."wait, how are the other pages gonna load inside the center box?"

so yah. that's pretty much my problem.


any and all help/thoughts/ideas/advice is greatly appreciate. even if you think it might not work, say it anyway. cause i'll research what you said and i'tll problly give me other ideas and results. so..comment away please.


thanks in advance.
__________________
My PC Specs
--Phoenix--
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,248 posts.
 
Join Date: Oct 2006
05-Mar-2007, 11:33 AM #2
For what it is meant to do CSS does it and more. No, css is not made to add 2 and 2. Its job is to take care of the design part of your site.

Now for your problem I used the php include() function, I made a post about it here.

http://xenweb.net/forums/showpost.ph...52&postcount=1

Any questions? Or is your problem totally different?

Oh yeah, and if the code is already download it won't take that long to display it the second time.
__________________
Guys, please, this is free tech support, act accordingly.
Tact's Avatar
Senior Member with 368 posts.
 
Join Date: Sep 2002
Location: California
05-Mar-2007, 03:05 PM #3
ok. based on your notes. it does seem to be everything i could have ever wanted. (omg the fabled frame killer! unpossible!!)

i copied and pasted the code to test it out. but um..i'm guessing it ain't gonna be that easy. (i just want to see it for myself. demo?)

i know i would probably have to change the "template/header.php" to whatever pages i have like "gallery.htm" or whatever.

but also i don't have apache/php/mysql installed on my pc either and i'm guessing i need an environement like that to properly test my site since this requires php. i guess it could be a good excuse to try out them new packages that were made like xxamp or whatever its calld. (i wish they had those a few years ago so i didn't have to struggle with incompatable versions like i did before )

but anyway. your notes are very encouraging. espcially this part

Quote:
Just imagine! I don't have to insert the <!doctype > info and other header info in each page (its true that it doesn't take that long but this way it is much more productive)... I don't have to insert the side bar links on each page... I don't have to insert the the copy right at the bottom of each page & so on
that's exactly what i want to avoid. the reason why i think frames are superior. and why i can't even imagine the thought of giving up on them and creating cheapy copy after copy of the same thing ..O_o and your solution seems really awesome too cause it seems very simple.


but i do have a question. will it change the way i link to things? lets say i have 2 pages that get called from links on a left menu.

link 1 is "page1"
link 2 is "page2"

how would those links look like using this method? right now my current setup is like..

Quote:
<a href="inews.htm" target="imid">here</a>
where "imid" is my center area. how would an average link look like if i'm using php to load the content on the page?
__________________
My PC Specs
--Phoenix--
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,248 posts.
 
Join Date: Oct 2006
06-Mar-2007, 01:19 AM #4
haha, your posts are funny.

The main problem with my solution is that if you have pages at different directory depths than its going to get a bit ugly.

Why? Because in the header it point to a css file so the path has to be correct. A work around is to use absolute paths. e.g. instead of using <link rel="stylesheet" type="text/css" href="./template/style.css" /> you use <link rel="stylesheet" type="text/css" href="http://mysite.com/template/style.css" />

About the php server, I have the links to the 2 most common in my sig, xammp, and appserv.

Now if you wanted to make a server and put it on the web than I would use xammp (apache friends), it has more features and is more secure.

However if you only wanted to put a php sever on your computer for testing and web dev than I would definitely go with appserv, it is much more simple and does the job.

as for your last problem, sorry i really don't understand.
__________________
Guys, please, this is free tech support, act accordingly.
Tact's Avatar
Senior Member with 368 posts.
 
Join Date: Sep 2002
Location: California
06-Mar-2007, 09:55 PM #5
it's ok. i've been struggling to find the correct wording as well.

Basically, I guess i simply can't wrap my head around how this trick works.

So the idea is it is possible to put an external html page inside another. using this php line of code. ok. i can understand that.

What I can't understand, is this being able to replace the funcionality of frames because the only thing the php line does is output/print the code from one page inside another.

Let me give an example. I have 4 pages.

I have Page 1, Page 2, Page 3, and Page 4 in my website.

Page 1 has three links. Link A, Link B and Link C.

Link A links to page 2. Link B links to page 3. And Link C links to page 4.

In the world of Frames. I would put all these pages inside a "Parent" Page. Let's call it Page 0. Page 0 is cut up into sections (with frames) such as Frame Left and Frame Right. Frame Left is the menu holding the links (page 1 basically) and Frame right Is currently holding Page 2.

So as I'm trying to explain how i'm sure we all know frames work. Is that I can make Link B make Page 3 come out over where Page 2 used to be. piece of cake.


This is where I get lost understanding your method. I'll say it slowly cause even when i read it fast i get lost too. haha

How does the browser know...

that i want a link to call a DIFFRENT page.....

into the SAME area.....

that the old php line of code was occupying?



that's is my number 1 question right there. I don't understand how it does that. I'm sorry if i'm slow. It just doen'st make sense unless i make another page exactly the same as your first one, except with a diffrent target in the php call function. and if this is the only way it works, then doesn't that defeat the purpose of not having to retype everything for every page?


I hope i made sense now. I had trouble finding the words.
__________________
My PC Specs
--Phoenix--

Last edited by Tact : 06-Mar-2007 10:00 PM.
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,192 posts.
 
Join Date: Apr 2005
Location: New York
Experience: I know what I know, I am
06-Mar-2007, 10:04 PM #6
Quote:
css all the way. woop de doo. but funciontally, it's crap.
um... you do realize that frames have less functionality, right?
  • Search engines can't index framed pages.
  • You can't direclty link to any one page on your site easily.
  • SEO is 0% (I say this again because it's very important)
  • Not all browsers support frames, so you might turn away some visitors
__________________
-----------------------------
| 404: Name Not Found |
-----------------------------
PLEASE NOTE: If I happen to help you in a post, or just simply reply to it, doesn't mean I want to be bombarded with PMs. I answer all questions in posts, not in PMs. Thank you, and have a good day.

<?php $h = 'Hello '; $w = 'World'; echo $h.$w; ?>

My Favorite Editors:
Windows: Crimson Editor
Mac: Taco HTML Edit
Linux: gPHPEdit
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,248 posts.
 
Join Date: Oct 2006
06-Mar-2007, 10:24 PM #7
Sorry Tact, I really didn't understand what you were trying to point out.
Tact's Avatar
Senior Member with 368 posts.
 
Join Date: Sep 2002
Location: California
06-Mar-2007, 11:07 PM #8
it's ok mmj. thanks for trying. I'll test it out for msyelf and see if i understand it better. cause i'm sure my lack of understanding is making me ask the wrong questions.



to namenotfound: thank you for you're concerns. I don't mean to put you down. I know you're being helpful. And in a situation where the site is for a client or something important, i would cherish your advice and follow it strictly. but my own personal site is mostly a hobby. it's the least of my concerns at the moment. thank you.


but you say I can't directly link to any of my pages? it's the easiest thing in the world. i almost have it by memory. i can make any page load in any frame including the parent frame.


and the only browsers that don't support them are either whacked out browsers with only a .001% userbase or popular browsers with versions that date back to 1996. if people can't update their browsers, they shouldn't be on the net. O_o


Well i'm gonna test out this new method now. If it does what frames can do or better. Then there's no point in me continuing to defend them. I'd consider them officially dead. But until then, frames all the way.
__________________
My PC Specs
--Phoenix--
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,248 posts.
 
Join Date: Oct 2006
06-Mar-2007, 11:18 PM #9
Play with it a little bit.
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,192 posts.
 
Join Date: Apr 2005
Location: New York
Experience: I know what I know, I am
06-Mar-2007, 11:22 PM #10
Quote:
Originally Posted by Tact
but you say I can't directly link to any of my pages? it's the easiest thing in the world. i almost have it by memory. i can make any page load in any frame including the parent frame.
I don't think you understand what I'm saying. See how there's a URL in the address bar?



When using frames, the URL doesn't change, because you never leave the index page. If TSG was like that, every page would display "http://techguy.org" making it hard to directly link to the page from another site.
__________________
-----------------------------
| 404: Name Not Found |
-----------------------------
PLEASE NOTE: If I happen to help you in a post, or just simply reply to it, doesn't mean I want to be bombarded with PMs. I answer all questions in posts, not in PMs. Thank you, and have a good day.

<?php $h = 'Hello '; $w = 'World'; echo $h.$w; ?>

My Favorite Editors:
Windows: Crimson Editor
Mac: Taco HTML Edit
Linux: gPHPEdit
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,248 posts.
 
Join Date: Oct 2006
07-Mar-2007, 01:39 AM #11
Quote:
Originally Posted by namenotfound
I don't think you understand what I'm saying. See how there's a URL in the address bar?



When using frames, the URL doesn't change, because you never leave the index page. If TSG was like that, every page would display "http://techguy.org" making it hard to directly link to the page from another site.
Right you are, I hate it how it does that in cPanel's File Manager.
Tact's Avatar
Senior Member with 368 posts.
 
Join Date: Sep 2002
Location: California
07-Mar-2007, 02:20 PM #12
haha. yah that's true. it's a good thing none of my pages are generated via some other method like php like a forum. (forum within frame omg! O_o)

but i know the name of every single page i have if i ever wanted to direct link someone. But i get what you were saying now.


well anywasy. i installed apserv. and i was having trouble getting it to work until i realized the main index file has to be .php as well. O_o (i dind't know that hehe) so then all the stuff was working. it was pretty cool. the php include functions inside don't have to be .php like the main index file which is cool too. i like it.


but i think i was right about the links.

if i wanted to make another page to have the same basic layout. but diffrent includes. i have to copy and paste everything from the first page, and change the include targets.

obviously, this is STILL way easier and more awesome than having to type everything else. but it doesn't really help me. i would still need to change every page i have. (70 plus pages) to look exactly the same.

you even said it yourself. but i didn't notice.

Quote:
All I have to do if I want to create a new page in my website is copy the code in the first box! Simple!
and then change the include targets? right?

yah. this ain't no good. it's the same as redoing my whole site with no frames. O_o just slightly less work. oh well.


thanks for all your help though. really appeciate it. i'll remember this trick for whenever i make new websites. (I'll make sure never to use frames again for every NEW website i ever make. but i don't think i will ever abondon frames for the first website [my first website]that i ever made)


thanks to everyone for all your help. you all rock! ^^


/me humbly bows.
__________________
My PC Specs
--Phoenix--
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,248 posts.
 
Join Date: Oct 2006
08-Mar-2007, 04:14 AM #13
The include targets shouldn't change unless the directory depth is different.

No problem.
kbazsi's Avatar
Member with 31 posts.
 
Join Date: Mar 2006
Location: Romania
Experience: Intermediate
08-Mar-2007, 07:36 AM #14
You can change your includes in a few simple steps.

I start with your links. They should look like this:
HTML Code:
<a href="index.php?page=page1.html">page1</a> <a href="index.php?page=page2.html">page2</a>
...
and in your index.php file

PHP Code:
[header]
[menu]
...

<?php
if (isset ($_GET['page'])) include ($_GET['page']);
else include (
"page1.html");
?>
...
[footer]
Tact's Avatar
Senior Member with 368 posts.
 
Join Date: Sep 2002
Location: California
11-Mar-2007, 05:51 PM #15
ok. i don't know if i should make a new thread about this. but i'd like to change the subject a little bit. from "can you replace frames" to "i'm having trouble witht he php script"

i'd like to use it for my friends site. http://www.legionofangels.net

to replace the iframe in the middle. the iframe contains the main page to a greymatter blog.

when i replace the iframe with the php include script. it totally destorys my layout on the main page. (i put the script inside a div so i can control it's height width. but that dien't help)

i think i know what the problem is. i think what is happening is the css of the blog is fighting agianst the css of my site. (but i'm not sure.) since the blog is it's own page it has it's own css. and since the site is it's own page. it too has it's own.

i was wondering what a good fix for this is? the only ideas i'm getting is taking away all the css from the blog. or giving them more specific names and controlling it from the main page.

or is there a way to make the main page ingore the css from the blog?
__________________
My PC Specs
--Phoenix--
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:32 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.