Jump to content


Photo

changing row of numbers to dropdown box


  • Please log in to reply
No replies to this topic

#1 tjhilder

tjhilder
  • Members
  • PipPipPip
  • Advanced Member
  • 136 posts
  • LocationKent, UK

Posted 26 December 2005 - 02:09 PM

******** SOLVED ********

I managed to figure it out, I used some javascript code I got from my javascript book.

**************

Hi,

using [a href=\"http://www.phpfreaks.com/tutorials/43/5.php\" target=\"_blank\"]this tutorial on pagination[/a] I wanted to change the numbers like previous 1 2 3 next to something more like...

previous [dropdown box] next

but with it having selected the one you're already on. any help would be great, I imagine it would be changing this part:
    for($i = 1; $i <= $numofpages; $i++){
        if($i == $page){
            echo($i." ");
        }else{
            echo("<a href=\"$PHP_SELF?page=$i\">$i</a> ");
        }
    }


    if(($totalrows % $limit) != 0){
        if($i == $page){
            echo($i." ");
        }else{
            echo("<a href=\"$PHP_SELF?page=$i\">$i</a> ");
        }
    }

but i'm not sure what I would have to do.

some help would be great :)

thanks in advance.

--
TJ




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users