Jump to content

External page that i load in iframe


r35pecta

Recommended Posts

Hy i have this problem: I create a website like this.Index.php have a iframe inside and all link open there with target=”myiframe”I have in a include folder the page that I open inside the iframe: Index.phpInclude/home.php (homepage scr iframe)Include/ferrari.php (content inside talking about Ferrari)Include/bmw.php (content inside talking about BMW) I want to know if is possible that when users found on internet search my external pageInclude/ferrari.php -> http://club.gircina.ro/ include/ferrari.php if they click on link the page open inside iframe and not normal without iframe. I want this beacause the website have header menu footer and if they click onexternal the page not load all of these ThanksHERE a exemple of what I say: http://club.gircina.ro/

Link to comment
Share on other sites

You can add Javascript code on all of your pages to check if the page is inside a frame, and if not, to redirect to the page with the frame and tell that page which content to load inside the frame. A better solution would be to not use the frame at all, why do you need a frame? You can use PHP to include all of the various files into one page that will always contain the navigation, header, footer, etc, plus whatever content you want to show.

Link to comment
Share on other sites

yes i know but i make the index.php that include heder - footer - menu - and left side of webside.on the right i put the iframe so i can load all page that i need (like articles) all the articles have only the content about what i want to write , dowsn't have header footer: for better explanetion i show you: this is the first page: http://celena.gircina.ro/celena.php and all articles are here: http://celena.gircina.ro/include/page like: http://celena.gircina.ro/include/page/condens.phphttp://celena.gircina.ro/include/page/important.phphttp://celena.gircina.ro/include/page/contact.php that is a page that i open from menu what do you think that i must do

Link to comment
Share on other sites

yes i know but i make the index.php that include heder - footer - menu - and left side of webside.
Like I said, you can do the same thing with PHP so that the end result continues to be that you only have to update the header, menu, or whatever in a single file, but all pages have that information on them. That is way more usable for a user than an iframe, and you still only have a single place where you would update that code.
what do you think that i must do
I told you what your options are. You can either add Javascript code to every page to detect and redirect, as well as adding code to your parent page to auto-load content into the iframe, or you can restructure your site to not use an iframe like the vast majority of websites out there. It's up to you which solution you want to pursue.
Link to comment
Share on other sites

thanks, i decide to make single page for every page content. beter solutionIs ok for SEO too, because i can make description and title for all the page

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...