Results 1 to 3 of 3

Thread: Help on: Ajax Tabs Content Script (v 2.2)

  1. #1
    Join Date
    Jul 2006
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Help on: Ajax Tabs Content Script (v 2.2)

    Script: Ajax Tabs Content Script (v 2.2)
    http://www.dynamicdrive.com/dynamici...axtabscontent/

    In version 2.2, I am wondering if I could "Reload page and select 2nd tab using URL parameter" BY clicking on the TAB, not on the external link.

    I understand it seems opposite the purpose of the tab function, but I need it to generate more page view.


    Further, I have 2 set of videos which each containing 4 parts, if I enable tab persistence, how could the page automatically back to Part 1 when I finished Video#1 start a new Video#2?

    Video #1:
    Part1 Part2 Part3 Part4

    Video #2:
    Part1 Part2 Part3 Part4

    Please let me know if you have any thing need to be cleared.

    Thank you.

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

    Default

    Regarding the first question, if you must, what you can do is add an "onClick" event handler inside the tab's parent LI element that does this:

    Code:
    <ul id="countrytabs" class="shadetabs">
    <li><a href="#" rel="#default" class="selected">Tab 1</a></li>
    <li onClick="location='demo.htm?countries=1'"><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
    <li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li>
    <li><a href="external4.htm" rel="#iframe">Tab 4</a></li>
    <li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>
    </ul>
    In other words, you'd add:
    Code:
    onClick="location='demo.htm?countries=1'"
    where "demo.htm" should be the URL of the current page (the one you want reloaded), and "countries", the tab instance's variable (ie: var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")), and finally 1, the tab that should be selected (1=2nd tab). Do this for all the tabs that you want the default behavior changed.

    Regarding part 2, I'm not sure I totally understand. Are you basically trying to dynamically change which tab is selected once a certain action is complete (ie: the playing of a video)?
    DD Admin

  3. #3
    Join Date
    Jul 2006
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    My question is

    Assume I have two html pages (for example : 1.html , 2.html) , each of the page contains two tabs (for example: tab1 , tab2) .

    how could I do this:

    visit : 1.html tab1 --> tab2
    visit : 2.html tab1 --> tab2

    As the persistance is on, it will automatically jump to tab2 when I close the 1.html and start 2.html.

    How could this problem could be solved?

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
  •