Results 1 to 4 of 4

Thread: Pagination, question about links inside?

  1. #1
    Join Date
    Aug 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pagination, question about links inside?

    1) Script Title: Ajax Pagination

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex17/ajaxpaginate/

    3) Describe problem:
    Okay, so im using the pagination script and its working great. Here is my question, in the pages I have loaded, there are links..

    so say your on index.php, and im using the pagination to include games.php. if I have a link on games.php, how can I get it to load in the index.php page..

    so if I had a link like <a href="?id=2&act=do"></a> on the included page, how can I get it to load as index.php?id=2&act=do

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    It depends. Is index.php?id=2&act=do a page that's part of a "book" that's already loaded into your content DIV, so all you really want to do is jump to that page using the link, or is that page not part of the existing loaded book?
    DD Admin

  3. #3
    Join Date
    Aug 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    its not part of the loaded book, basically I have lots of different game pages, with different titles, like tetris.php etc. and you can comment on each game, but the comments are included in a book, on that included page I have links, that i want to load in the current page, not go to a new page.. ie, tetris.php?id=1&act=now instead of includedpage.php?id=1&act=no

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Well, generally, to load a new book into the script, you'd call:

    Code:
    bookvarinstance.refresh(newsettingsvar)
    On the supplementary page, an example of this is shown:

    Code:
    <div id="paginate-top"> </div>
    <div id="pcontent"> </div>
    <div id="paginate-bottom"> </div>
    
    <script type="text/javascript">
    
    var bookonflowers={
    pages: ["demofiles/flower.htm", "demofiles/flower2.htm", "demofiles/flower3.htm", "demofiles/flower4.htm"],
    selectedpage: 0 //set page shown by default (0=1st page)
    }
    
    var bookonanimals={
    pages: ["demofiles/external.htm", "demofiles/external2.htm", "demofiles/external3.htm"],
    selectedpage: 0 //set page shown by default (0=1st page)
    }
    
    var demo=new ajaxpageclass.createBook(bookonflowers, "pcontent", ["paginate-top", "paginate-bottom"])
    
    </script>
    
    <a href="javascript:demo.refresh(bookonanimals)">Load Book on Animals instead</a><br />
    DD Admin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •