Results 1 to 6 of 6

Thread: Ajax Tabs Content Script - Caching in Firefox

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

    Question Ajax Tabs Content Script - Caching in Firefox

    1) Script Title:
    Ajax Tabs Content Script

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

    3) Describe problem:
    Hey there,

    first of all: thanks a lot for the great work, the script works (almost) perfect!

    But I've got one question:
    I produce the tabs dynamic out of a database ... no problem so far ... works well.
    When I get a url like /index.php/testing/tab1
    then I would like to set 'tab1' on page 'testing' as active, no matter in which order the tabs are.

    Until now no problems, it took me a while, but it's working.

    Here a litte bit of source-code, which inserts the javascript to generate the tabs:

    Code:
     echo "<script type=\"text/javascript\">\n";
     echo "<!--\n";
     echo "var tabs=new ddajaxtabs(\"tabcontainer\", \"text_tabs\")\n";
     echo "tabs.setpersist(false)\n";
     echo "tabs.setselectedClassTarget(\"link\")\n";
     echo "tabs.init()\n";
     echo ($tab["bezeichnung"]!="")?"tabs.expandit('".$tab["bezeichnung"]."')\n":"";
     echo "//-->\n";
     echo "</script>\n";
    That really works great, but when I open a site with tabs in Firefox (actually 2.0.0.10, not tested in other versions yet), with a url like above, it sets the correct tab as active, but the content of the first tab (no matter which one this is) is displayed!!!

    Like you see, I set tabs.setpersist to false, it works perfectly in IE, but not in Firefox ...

    Do you have any idea on this problem? Thanks in advance for comments!

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

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.

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

    Default

    http://meyerbeck.flexlogic.info

    Sorry, it's german, not english

    If you go to "Unternehmen - Über uns", it works correctly.
    If you go to "Dienstleistungen - Verkauf/Marketing", the problem occurs.

    Thanks in advance!

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

    Default

    Hmmm looking at your page, I'm not sure I understand the problem. FYI, both "Über uns" and "Verkauf/Marketing" when clicked on causes the 1st tab to be selected, and its corresponding content (I assume). You say you wish to use a URL parameter to indicate to the script which tab to select by default, so I gather instead of just:

    http://meyerbeck.flexlogic.info/inde...rkaufmarketing

    I should be using a different URL to test out this aspect of your problem?

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

    Default

    You may also want to see this thread, which shows a JavaScript solution for getting a certain tab to be selected by default through URL parameters.

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

    Default

    Thanks a lot for the responses, and the other threads are very interesting ... have to keep them in mind *gg*

    But when I tried again today, the problem disapeared ... no idea why?!?!
    Probably really something stayed in the cache of Firefox and then showed me the last active tab ... although I deleted everything ... mmmhhhh.

    Thanks again and have a nice day!

    EDIT: damn ... not really ...
    The problem still exists ... after doing it a few times ...
    if you go to http://meyerbeck.flexlogic.info/inde...rkaufmarketing then the first tab should be active ... works
    if you go to http://meyerbeck.flexlogic.info/inde...eting/seminare then again the first tab should be active ... works too
    if you go to http://meyerbeck.flexlogic.info/inde...rketing/events then again the third tab should be active ... it is active, but content of tab1 is displayed! tip: workshops and events-tab are empty files, so nothing should be displayed!

    The third parameter after index.php/ ... should be the tab to select --> if it is empty, take the first one, if not, expandit
    Last edited by gustel; 11-29-2007 at 07:37 AM.

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
  •