Jump to content

Archived

This topic is now archived and is closed to further replies.

auris

Advanced paging

Recommended Posts

hi all, does anybody know how to make previous 1 2 3 next links? in macromedia forums i found a script previous-0-1-2-3next links, bu there are two problems:0 is at the beginning and next link sometimes doesn't work! here's the script:

 

<?php if ($pageNum_Rs1 > 0) { // Show if not first page ?> <a href="<?php printf("%s?pageNum_Rs1=%d%s", $currentPage, max(0, $pageNum_Rs1 - 1), $queryString_Rs1); ?>">Previous</a> <?php } // Show if not first page ?><?php for($i = 0; $i <= $totalPages_Rs1; $i++){ if(($pageNum_Rs1) == $i){ echo "<strong><font color=#FF0000>$i </font></strong>"; } else { echo "<a href=\"".$_SERVER['PHP_SELF']."?pageNum_Rs1=$i\">$i</a> "; } } ?> <?php if ($pageNum_Rs1 < $totalPages_Rs1) { // Show if not last page ?> <a href="<?php printf("%s?pageNum_Rs1=%d%s", $currentPage, min($totalPages_Rs1, $pageNum_Rs1 + 1), $queryString_Rs1); ?>">Next</a> <?php } // Show if not last page ?>

 

Share this post


Link to post
Share on other sites

Several free extensions available in macromedia exchange that will write this code for you. Also a useful chapter in the manual if i remember correctly so press F12 and look in creating navigation.

Share this post


Link to post
Share on other sites

check the tutorials....i get some idea of paginating from there..well, couldnt remember the tutorial number, but i bet you'll find it :lol:

 

ohya...i did post a question regarding pagination in one of the forum..but i'm not sure whether you detect the question using my username...i didnt register myself that time...but using the same username though... :o

 

Hope that'll help...

cheers..

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.