Link to home
Start Free TrialLog in
Avatar of BrighteyesDesign
BrighteyesDesignFlag for Afghanistan

asked on

Can PHP be used like iframes?

I have put a site together using two iframes (to allow continuous music).

These iframes are not displaying properly though in IE8 and Chrome so i'm wondering if it is possible to use PHP include rather than an iframe?

It would need to work so the user actually stays on one page but navigates around the site in the same way as an iframe.

Is this possible?
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

yes, you can include it in the IFRAME
Avatar of BrighteyesDesign

ASKER

Thanks for that, the thing is though is that the problem is with the iframe so i'm guessing the problem will still be there i'll give it a go though.

How would the code be, I have tried this but I get a 404.html even though that URL path is correct?

 <iframe src="<?php include("http://www.riad-hikaya.com/enter.html"); ?>" width="1062" height="645" scrolling="no" frameborder="0" id="frame1"  allowTransparency="true" background="transparent"></iframe>
ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for that, everything is on the same domain though.
Fair enough, but remember that domain.com  and sub.domain.com also count as different.

Cheers

BP
@bportlock, the problem is that asker uses iframe to play continous music in his site - wonderful site but unfortunately I think I'll never can sleep in that residence...:-( Site works perfectly with all browsers except IE8 and Chrome. It seems to be a css problem than a php problem: I can't help him, maybe you can but I fear you're talking about an unrelated question which can confuse the real problem here :-)

Bye
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh, well, I misunderstood your intentions and I apologize for this. On to the next :-)
Thanks all,

I have figured out that when JQuery is removed from the page it works ok.

The thing is I need JQuery on there which is why I was looking to ditch iframes and look if pure php was possible.

The original, more general question is still open here https://www.experts-exchange.com/questions/27295018/White-flicker-on-page-load-usingiframe.html
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks all, i'm guessing that's a no to pure PHP solution then for this problem. Elsewhere, I have been pointed towards AJAX so i'm going to see what that's all about!
greetings BrighteyesDesign, having your music be continuous while navigating from page to page, may be a problem. I had a fairly sussesful set up for that, using the old style "frameset" with the flash music player in one frame and the page contents in another, you might look at the instructions for framesets here - http://www.w3.org/TR/html4/present/frames.html
However, they may have some or all of the problems using the JQuery JS framework, some JS like JQuery and Mootools, when they are first loaded do a document object model "Scan" for page elements they need to have "configured" or "captured" for the event monitor etc. , this may cause the flickering, or the IFrame failure for you. I can not think of a way to use PHP as placing a DIV with code that might do what you need, ,
AS far as what I would try to do, is use an AJAX send-receive to change the "Page Content", so you can have the music play without ever changing the entire page... Just My thoughts, I feel that the "Old Way" is to change page contents by changing the web address of the browser with a "Link", , due to increased bandwidth for most ISP, I see more and more web sites using the "New Way" of changing user content with AJAX. I have spent a good deal of time recently updating many of my pages to use AJAX or javascript to change page views, instead of links.
Thanks Slick,

I actually looking at AJAX now, i'm just having trouble loading some JQuery content...

I have a question open here if you can help?   https://www.experts-exchange.com/questions/27296093/Jquery-not-working-with-Ajax-frames.html?anchorAnswerId=36498716#a36498716