Welcome to WebmasterWorld Guest from 54.145.173.36

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Recordset Paging Reloads Whole Page

Can recordset data reload independent of header/footer?

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

5+ Year Member



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">
<tr>
<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>

<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 ?>
</div></td>
</tr>
</table>
</div>

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

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

WebmasterWorld Senior Member 10+ Year Member



You could do that with frames.
11:56 am on Apr 30, 2009 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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)

5+ Year Member



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)

5+ Year Member



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)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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