Results 1 to 6 of 6

Thread: Pagination

  1. #1
    Join Date
    Nov 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pagination

    1) Script Title: Virtual Pagination script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pagination.htm

    3) Describe problem:

    Hi,

    I have an HTML page, with an iframe in it. The iframe is supposed to change its source as user clicks on the pagination as follows:
    previous 1񔘝񔿷 next

    the source for the iframe should change accordingly from go_page1.htm to go_page2.htm to go_page3.htm, etc. to avoid the reloading of the whole HTML page.
    the "Virtual Pagination script" do what Im searching but with DIVs, is possible to make the demo 3 works with my iframe?

    Thanks for your help in advance

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

    Default

    If all you need is to display different pages within the same iframe when various links are clicked, you don't need a complex script for that. Just learn how to access an iframe and update its URL dynamically. For example:

    Code:
    <iframe id="test" src="about:blank" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="width:400px; height:300px;"></iframe>
    
    <a href="javascript:gotopage('http://google.com')">Google</a> | <a href="javascript:gotopage('http://www.yahoo.com')">Yahoo</a>
    
    <script type="text/javascript">
    
    function gotopage(url){
    document.getElementById("test").src=url
    }
    </script>

  3. #3
    Join Date
    Nov 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for answer, but how I can make work the "prev" and "next" buttons? and how to highlight the current page number opened in the iframe, for example:

    at the begining is:

    prev 1 2 3 4 next

    and when user click on next:

    prev 1 2 3 4 next

    and so and so until reach 4. Also with the freedom for the user to click in any page number.

  4. #4
    Join Date
    Nov 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No one has an idea plz , Im trying with arrays, but do this on every page with iframes I think is not correct, Im trying to do this with an external .js.

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

    Default

    It'll take some time before I can modify virtual pagination script to be IFRAME based, as it's more than just a few simple edits. In the meantime, have you looked at Ajax Tabs Content? It supports an IFRAME mode (see 3rd demo) that should do most of what you need.

  6. #6
    Join Date
    Nov 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much for your help, the Ajax Tab Content works great.

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
  •