View previous topic :: View next topic |
Author |
Message |
hc2995 -
Joined: 07 Aug 2006 Posts: 644 Location: Maryland, USA
|
Posted: Fri Jul 13, 2007 8:01 am Post subject: Changing content in the body portion of a page only? |
|
|
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 |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Jul 13, 2007 11:52 am Post subject: |
|
|
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 |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Jul 14, 2007 2:30 pm Post subject: Re: Changing content in the body portion of a page only? |
|
|
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 |
|
|
hc2995 -
Joined: 07 Aug 2006 Posts: 644 Location: Maryland, USA
|
Posted: Sat Jul 14, 2007 9:50 pm Post subject: |
|
|
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 |
|
|
|