I frame breakout ish...
Moderators: egami, macek, gesf
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
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
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
Many Thanks
Ben
- ruturajv
- php-forum Super User
- Posts: 1279
- Joined: Sat Mar 22, 2003 9:42 am
- Location: Mumbai, India
- Contact:
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:
You guys must hate people like me who juts cant get summin
Are you basicly saying dont worry about it?
Are you basicly saying dont worry about it?
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
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
- swirlee
- Moderator
- Posts: 2257
- Joined: Sat Jul 05, 2003 1:18 pm
- Location: A bunk in the back
- Contact:
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.
well are there any alternitives to iframes??
I can use php if needed
I can use php if needed
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>
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?
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
for the links you would add ?menu=XXXXX
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
Thanks
I dont know if i can really be bothered to change all my pages but ill have a look
Thanks
Ben
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?
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?