Results 1 to 7 of 7

Thread: 2 Ajax Tabs Contents on the same page (one inside of another)

  1. #1
    Join Date
    Jan 2007
    Posts
    23
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default 2 Ajax Tabs Contents on the same page (one inside of another)

    1) Script Title: Ajax Tabs Contents

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

    3) Describe problem: I spent the whole day trying to customize this script so that if I click on some tab, it loads another tabs content with sub-tabs.

    Maybe it's hard to understand what I mean, so I post 1 of my tests below. Screenshoot attached.

    ============
    demo.htm

    PHP Code:
    <body>

    <
    ul id="maintab" class="shadetabs">
    <
    li><a href="external.htm" rel="ajaxcontentarea">Europe</a></li>
    <
    li><a href="external2.htm" rel="ajaxcontentarea">Asia</a></li>

    </
    ul>

    <
    div id="ajaxcontentarea" class="contentstyle">

    Default 
    Content

    </div>



    <
    script type="text/javascript">
    startajaxtabs("maintab""newstab")
    </script>


    </body> 
    external.htm

    PHP Code:
    <ul id="newstab" class="shadetabs">
    <
    li><a href="external.htm" rel="newscontentarea">Germany</a></li>
    <
    li><a href="external2.htm" rel="newscontentarea">Spain</a></li>

    </
    ul>

    <
    div id="newscontentarea" class="contentstyle">
    Europe main content
    </div
    external2.htm

    PHP Code:

    <ul id="newstab" class="shadetabs">
    <
    li><a href="external.htm" rel="newscontentarea">Indonesia</a></li>
    <
    li><a href="external2.htm" rel="newscontentarea">Malasya</a></li>

    </
    ul>

    <
    div id="newscontentarea" class="contentstyle">
    Asia main content
    </div
    Everything works fine, except sub-tabs. The content of sub-tabs opens not inside of div, but as a new file.

    Thanks in advance.
    Last edited by viens; 03-14-2007 at 12:39 AM.

  2. #2
    Join Date
    Apr 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm having the same issue. Can anyone help out.? I have tried several methods of renaming variables. But the secondary tabs never open in the div.. they load into the entire window or a new window. Any help would be appreciated.

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

    Default

    Me tooo pleasee help someonee

  4. #4
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I also have this problem :-(

  5. #5
    Join Date
    Jul 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    same problem here...
    would be nice if someone could help out to find a solution for this

  6. #6
    Join Date
    Aug 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ajax Tabs is not capable of opening multiple pages within the same tab, you would need to create a blank HTML page with an iFrame, then call the HTML page for the tab.

  7. #7
    Join Date
    Aug 2004
    Posts
    10,138
    Thanks
    3
    Thanked 1,007 Times in 992 Posts
    Blog Entries
    16

    Default

    Actually, nesting sub tabs within an external page that also fetch its content via Ajax is possible. You just need to know that startajaxtabs() needs to be called separately for the sub tabs, specifically, after they've been added to the DIV on your page.

    Attached is a demo of how this works. Only two files changed are ajaxtabs.js, and demo.htm (with a new subtabid attribute).

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
  •