homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Recordset Paging Reloads Whole Page
Can recordset data reload independent of header/footer?

 7:04 am on Apr 30, 2009 (gmt 0)

Im building a simple page with a header/content/footer layout. The header contains the nav, the content section contains 8 records from a recordset and pages through them 8 at a time with next and previous buttons at the bottom, and the footer is a flash movie that plays continuously.

My question is: Is there a way to keep the header and footer separate from the rest of the page so that when a user clicks through to consecutive pages the whole layout doesnt reload? And specifically: the flash movie can continue playing?

Someone mentioned using frames however I keep reading that frames are a no-no in this day & age.

Here's the recordset paging code:

<div id="arrows">
<table border="0">
<td><?php if ($pageNum_creditsList > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_creditsList=%d%s", $currentPage, max(0, $pageNum_creditsList - 1), $queryString_creditsList); ?>"><img src="images/btnPrev.png" border="0" /></a>
<?php } // Show if not first page ?> </td>


<div align="right">
<?php if ($pageNum_creditsList < $totalPages_creditsList) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_creditsList=%d%s", $currentPage, min($totalPages_creditsList, $pageNum_creditsList + 1), $queryString_creditsList); ?>"><img src="images/btnNext.png" border="0" /></a>
<?php } // Show if not last page ?>

[edited by: Revata at 7:09 am (utc) on April 30, 2009]



 7:06 am on Apr 30, 2009 (gmt 0)

You could do that with frames.


 11:56 am on Apr 30, 2009 (gmt 0)

Welcome to WebmasterWorld, Revata.

Another option would be to use JavaScript to fetch the request and update the content area. The term often used to describe this technique is AJAX.


 7:08 pm on Apr 30, 2009 (gmt 0)

Thanks for the responses eeek, coopster. I've loaded it into an iframe and it seems to be working for the most part. There's just an issue with a media player that wont load now. If I can't figure that out I might look into AJAX.

Thanks for the help!


 9:41 pm on Apr 30, 2009 (gmt 0)

I'd go with Ajax on this one. Even if everything works ok with a frame, you'll soon discover wonderful things you can accomplish with ajax requests : )
My suggestion is the prototype library, extremely simple, excellent documentation and great compatibility with other libraries.


 12:41 am on May 1, 2009 (gmt 0)

Content in the iframe will not be indexed by searchengines as being a part of the page.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved