I frame breakout ish...

A

Anonymous

Guest
Hi i run 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
 
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.
 
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.
 
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
 
Allforums said:
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:
 
You guys must hate people like me who juts cant get summin


Are you basicly saying dont worry about it?
 
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 :( ;)
 
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
 
Allforums said:
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.
 
well are there any alternitives to iframes??

I can use php if needed
 
The alternative to iframe like I mentioned is using CSS and overflow:auto
Code:
<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>
 
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?
 
you would use php


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

you would use includes in the file like

Code:
<?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
 
Thanks

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

Thanks
Ben
 
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?
 
I try to frame besttenrackets.com/best-tennis-ball-machines/
site its working fine.
 
Back
Top