Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: ajax paginate not working on firefox 2.0

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

    Default ajax paginate not working on firefox 2.0

    well
    i am doing this

    PHP Code:
    <script type="text/javascript">

    var bookonflowers={
    pages: [<?php 
    for ($i=0$i<$total_pages$i++) 
    $start $display $i
    if (
    $i==0
    {
    echo 
    "\"fetchallusersphotos.php?block=1&start=$start&display=$display\"";

    else 
    {
    echo 
    ",\"fetchallusersphotos.php?block=1&start=$start&display=$display\"";

    }
    ?>],
    selectedpage: 0 //set page shown by default (0=1st page)
    }


    var bookonanimals={
    pages: [<?php 
    for ($i=0$i<$total_pages1$i++) 
    $start1 $display $i
    if (
    $i==0
    {
    echo 
    "\"fetchallusersphotos.php?block=2&start=$start1&display=$display\"";

    else 
    {
    echo 
    ",\"fetchallusersphotos.php?block=2&start=$start1&display=$display\"";

    }
    ?>],
    selectedpage: 0 //set page shown by default (0=1st page)
    }
    on this
    http://www.dynamicdrive.com/dynamici...nate/index.htm

    but it works fine on IE6 but it fails in firefox
    ie
    first tabset shows

    but when i click on second tab(animal..)..though it has some contents it shows same old content of tab 1 (flower..)

    so what kind be matter with it...
    thanks

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

    Default

    We need to see the actual rendered page. Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

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

    Default

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <link rel="stylesheet" type="text/css" href="../css/ajaxpagination.css" />
    
    <script src="../ajaxpagination.js" type="text/javascript">
    
    /***********************************************
    * Ajax Pagination script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    </head>
    
    <body>
    <ul>
    <li><a href="javascript:mybookinstance.refresh(bookonflowers)">Your Personal Photos</a></li>
    <li><a href="javascript:mybookinstance.refresh(bookonanimals)">Photo Posted by You</a></li>
    <li><a href="javascript:mybookinstance.refresh(bookcombo)">All Events Photos </a></li>
    
    </ul>
    
    <div id="paginate-top"> </div>
    <div id="bookcontent"> </div>
    <div id="paginate-bottom"> </div>
    
    <p><a href="javascript:mybookinstance.selectpage(1)">Select 2nd page dynamically</a></p>
    
    <script type="text/javascript">
    
    var bookonflowers={
    pages: ["fetchallusersphotos.php?block=1&start=0&display=2","fetchallusersphotos.php?block=1&start=2&display=2"],
    selectedpage: 0 //set page shown by default (0=1st page)
    }
    
    
    var bookonanimals={
    pages: ["fetchallusersphotos.php?block=2&start=0&display=2"],
    selectedpage: 0 //set page shown by default (0=1st page)
    }
    
    var bookcombo={
    pages: ["demofiles/flower.htm", "demofiles/flower2.htm", "demofiles/flower3.htm", "demofiles/flower4.htm", "demofiles/external.htm", "demofiles/external2.htm", "demofiles/external3.htm", "demofiles/flower.htm", "demofiles/flower2.htm", "demofiles/flower3.htm", "demofiles/flower4.htm", "demofiles/external.htm"],
    selectedpage: 0 //set page shown by default (0=1st page)
    }
    
    var mybookinstance=new ajaxpageclass.createBook(bookonflowers, "bookcontent", ["paginate-top", "paginate-bottom"])
    
    </script>
    
    
    
    </body>
    
    </html>
    Well i have not used third tab...
    i am using first and second tab

    first tab works fine but when i click on second tab bookonanimals the content from the first tab shows...with 1-2 pages....
    and when i click on page 1 only then the content of tab2 is shown.....

    it works well with IE.....
    i think it has some thing to do with cache....
    any way thanks

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

    Default

    well
    the main problem seems to be this

    the content of 1st tab of first one...ie 1st content of book...
    seems to be cached by the browsers.....

    even in IE if i delete the first one column from the database....and hit refresh the row(content) is still shown..
    though it actually is not in database or has been deleted

    so content seems to be coming from cache....

    if i close browser and open it in new window then only the deleted row is not seen

    in js term i think it is session only persistence so how can i disable it....this is my thinking ...i dont know much of js...
    will be g8 if somebody looks in both above files and sort out the problem...

  5. #5
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i think the first was not that clear any way
    of this
    <li><a href="javascript:mybookinstance.refresh(bookonflowers)">Your Personal Photos</a></li>
    <li><a href="javascript:mybookinstance.refresh(bookonanimals)">Photo Posted by You</a></li>
    <li><a href="javascript:mybookinstance.refresh(bookcombo)">All Events Photos </a></li>



    your personal photos(bookonflowers) loads fines and pagination also works

    but when i click photo posted by you (bookonanimals) the first one ie booksonflowers tab set comes.... with 2 pages..with second page loaded...rather than new content of 2nd tab set (bookonanimals)

    i saw final line is like this
    var mybookinstance=new ajaxpageclass.createBook(bookonflowers, "bookcontent", ["paginate-top", "paginate-bottom"])

    ...flowers ...is it causing problems

    thanks

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

    Default

    If the problem is due to IE caching the settings variable, inside the .js file, try setting the following line to true:

    Code:
    ajaxpageclass.ajaxbustcache=true // Bust cache when fetching pages?
    DD Admin

  7. #7
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    If the problem is due to IE caching the settings variable, inside the .js file, try setting the following line to true:

    Code:
    ajaxpageclass.ajaxbustcache=true // Bust cache when fetching pages?
    well thanks it did solved the IE problem ...

    but that firefox problem is still on
    any way this is what happens
    <li><a href="javascript:mybookinstance.refresh(bookonflowers)">Your Personal Photos</a></li>
    <li><a href="javascript:mybookinstance.refresh(bookonanimals)">Photo Posted by You</a></li>
    <li><a href="javascript:mybookinstance.refresh(bookcombo)">All Events Photos </a></li>



    bookonflowers has 6 photos for now...i am displaying two photos on each tab

    when i open it in firefox ...it loads and all 3 pages (pagination,both on top and button) appers and works


    now the bookonanimals ie photo posted by you there is only one photo for now....

    and when i click that ...the upper pagination says...1 of 1 ...(as there is only one photo)...but the last clickced tab of the first group ie bookonflowers is displayed and lower pagination still shows 3 pages (that is of first group ie bookonflowers but it should have been one of one and displayed new photo...)

    so where is problem ....it is making me difficult to trace it as it is working fine on IE....

    please help...
    i think it is almost done now
    thanks

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

    Default

    So is the problem with Firefox exactly the same as with IE (before enabling cache busting solved it for the later)? In other words, does it look like a caching issue as well in FF?
    DD Admin

  9. #9
    Join Date
    Aug 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    So is the problem with Firefox exactly the same as with IE (before enabling cache busting solved it for the later)? In other words, does it look like a caching issue as well in FF?
    ya
    as i have been saying
    it is working fine in IE...
    the problem is with firefox only i am using ff 2.0 i am using ie 6

    in ie it is working fine...

    thanks

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

    Default

    Well, from the script's perspective, it's basically done all it could to bust cache of the fetched page already when you set ajaxpageclass.ajaxbustcache to true. If it's still returning cached data, you will need to look at the server side for additional help. A quick search on PHP no cache on Google.
    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
  •