Changing content in the body portion of a page only?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
hc2995
-


Joined: 07 Aug 2006
Posts: 644
Location: Maryland, USA

PostPosted: Fri Jul 13, 2007 8:01 am    Post subject: Changing content in the body portion of a page only? Reply with quote

I have made a site in PHP for a company, but they have requested that i add a music player to the footer of the site, this i have done, the problem is when someone navigates away from the page, the music stops. While they are fine with this, i am not 100% with it. So im asking how can i change the content of the body portion of the page, but leave the footer alone (so the body changed, but nothing else does, and instead of going to a new page, the body just changes) I know how to do this with IFRAME's but i do not in PHP. The footer is included in the PHP page, the the PHP page itself has a few pieces of code for logging and such that is required so i cant really change the site from PHP to HTML and use IFRAME's. Any help is appreciated :D

PS, the header and footer are HTML
_________________
Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P
Back to top View user's profile Send private message AIM Address
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Fri Jul 13, 2007 11:52 am    Post subject: Reply with quote

Remember that PHP does not do anything special for the browser. It is HTML which does these frames. Everything output to your browser is HTML or JavaScript, nothing more. If you need to use frames then use frames. Make the footer a seperate file and the body another and use an iframe to set the body.

The other alternative is to make the media player a popup.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Jul 14, 2007 2:30 pm    Post subject: Re: Changing content in the body portion of a page only? Reply with quote

hc2995,

You'll probably have to generate some Javascript code in your HTML page which will update the page contents without reloading the whole page.

This is by the way what AJAX technology is all about. Check http://www.modernmethod.com/sajax/ for a simple AJAX PHP library.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
hc2995
-


Joined: 07 Aug 2006
Posts: 644
Location: Maryland, USA

PostPosted: Sat Jul 14, 2007 9:50 pm    Post subject: Reply with quote

Iv heard about ajax, bit iv never used it. Ill look into it :P
_________________
Where have i been? School got heck-tick, had to move half way around the state, then back... and then i had to change jobs, so iv been away for a while :P
Back to top View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group