I frame breakout ish...

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

Allforums
New php-forum User
New php-forum User
Posts: 14
Joined: Wed Sep 17, 2003 10:01 am
Contact:

I frame breakout ish...

Postby Allforums » Wed Sep 17, 2003 10:32 am

Hi i run http://www.allforums.co.uk and we use an iframe for our main content but google lists our main page and the pages in the iframe

When you click the link it shows just the iframe and not the page which is normally around it

How can i make this better??

Many Thanks
Ben

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Googology

Postby ruturajv » Wed Sep 17, 2003 9:38 pm

Check how google searches the pages...
It is better to do that and then create your main pages accordingly,
Eg. Put keywords meta tag in the main frame as well.

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Wed Sep 17, 2003 10:56 pm

instead of using iframes I would use CSS and use the {overflow:auto;} this will allow for the main page to contain all the content.

Allforums
New php-forum User
New php-forum User
Posts: 14
Joined: Wed Sep 17, 2003 10:01 am
Contact:

Postby Allforums » Thu Sep 18, 2003 9:24 am

thanks everyone but is there no better way to do this than change from an iframe and sorry ruturajv but i wasnt quite sure what you were on about, could you please re phrase it??

Many Thanks
Ben

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Thu Sep 18, 2003 9:11 pm

Allforums wrote:sorry ruturajv but i wasnt quite sure what you were on about, could you please re phrase it??


What i meant was on your search problem, google always will show the link which actually has the search keywords, it will not bother to show the main page, if found on some remote page... Fine give the link to that remote page, even if it is some sort of an include!
:idea:

Allforums
New php-forum User
New php-forum User
Posts: 14
Joined: Wed Sep 17, 2003 10:01 am
Contact:

Postby Allforums » Thu Sep 18, 2003 10:48 pm

You guys must hate people like me who juts cant get summin


Are you basicly saying dont worry about it?

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Google

Postby ruturajv » Fri Sep 19, 2003 12:57 am

What I want you is to write much better meta tags, etc to make google work perfectly and all.

And further if you are using dynamic pages, it is difficult to make google work for you :( ;)

Allforums
New php-forum User
New php-forum User
Posts: 14
Joined: Wed Sep 17, 2003 10:01 am
Contact:

Postby Allforums » Sat Sep 20, 2003 3:49 am

Well yea thanks but thats not actually what i wanna do

I want something which is going to sort of find out if that page should be in a frame and if so open the outside frame with it

I hope you guys are understanding what im sayin

Any help is greatly appreciated

Thanks
Ben

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Sat Sep 20, 2003 1:10 pm

Allforums wrote:I want something which is going to sort of find out if that page should be in a frame and if so open the outside frame with it


This is a common problem, and one of the many good arguments as to why you shouldn't use frames, ever. There's no reliable way, except, perhaps, using some ugly JavaScript (which isn't reliable, since some people have it turned off), to do this. That's why you see a lot of sites which say "If this page isn't in a frame, click here." One possible solution is to check the referrer to see if the referring page is the frameset. But it's not flawless. In the long run, it'll serve you better just not to use frames, but I'm sure that's not what you want to hear.

Allforums
New php-forum User
New php-forum User
Posts: 14
Joined: Wed Sep 17, 2003 10:01 am
Contact:

Postby Allforums » Mon Sep 22, 2003 4:30 am

well are there any alternitives to iframes??

I can use php if needed

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Mon Sep 22, 2003 6:19 am

The alternative to iframe like I mentioned is using CSS and overflow:auto

Code: Select all

<html>
<head><title></title>
<style type="text/css" media="all">
div.myframe {
height:400px;
width:400px;
overflow:auto;
}
</style>
</head>
<body>
<div class="myframe">
If the content of this div exceeds a height of 400px it will add a scroll bar
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/>testing<br/><br/><br/><br/><br/><br/><br/>Testing
</div>
</body>
</html>


Allforums
New php-forum User
New php-forum User
Posts: 14
Joined: Wed Sep 17, 2003 10:01 am
Contact:

Postby Allforums » Mon Sep 22, 2003 9:44 am

so that would be a complete webpage, right?

What would the target of my links be?
myframe???

So i would just have to put that in the main page and then load my html page into it? Nothing goes into the html page inside the frame?

And also where would i put the files in my ftp?

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Tue Sep 23, 2003 4:53 am

you would use php


There is no target because it isn't technically a frame.

you would use includes in the file like

Code: Select all

<?php
switch($_GET['menu'])
{   
    case 'page1':
     include('page1.inc.php');
     break;
    case 'page2';
     include('page2.inc.php');
     break;
    default:
     include('main.inc.php');
}
?>


for the links you would add ?menu=XXXXX

Allforums
New php-forum User
New php-forum User
Posts: 14
Joined: Wed Sep 17, 2003 10:01 am
Contact:

Postby Allforums » Tue Sep 23, 2003 9:31 am

Thanks

I dont know if i can really be bothered to change all my pages but ill have a look

Thanks
Ben

LiLpunkSkateR
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Oct 06, 2003 2:36 pm
Location: Maine, USA
Contact:

Postby LiLpunkSkateR » Sat Oct 11, 2003 6:39 am

<script type="javascript">
if ($self!="_top")
{
meta redirect to frameset page
}
</script>

Allforums
New php-forum User
New php-forum User
Posts: 14
Joined: Wed Sep 17, 2003 10:01 am
Contact:

Postby Allforums » Mon Oct 13, 2003 9:38 am

Just tried that in various pages over the html page but no luck

where in the page is it meant to go, head or body??

Also is it something to do with the fact that im going from an html page to a php page?


Return to “HTML Basics”

Who is online

Users browsing this forum: No registered users and 1 guest

cron