Results 1 to 5 of 5

Thread: an 'all' tab in the ajax tabs menu

  1. #1
    Join Date
    Aug 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default an 'all' tab in the ajax tabs menu

    1) Script Title: Ajax Tabs Content

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

    3) Describe problem:
    I've got a fully functioning ajax tabs menu. Thanks!!!

    What I'd like to do, however, is add a tab called 'all' that when you click it, all of the content from each of the other tabs gets displayed. I'm guessing it's just a matter of adding some more div containers, but not sure. What do you suggest?

    Thx

  2. #2
    Join Date
    Aug 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    anyone able to point me in the right direction?

    thx

  3. #3
    Join Date
    Aug 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I really need to get this working...

    Anyone able to help me out? Please?

  4. #4
    Join Date
    Aug 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I was able to get it to work locally by modifying the ajaxtabs.js file here:

    Code:
    function initializeAllPage()
    {
    	clientSideInclude('include1', '1.html');
    	clientSideInclude('include2', '2.html');
    	clientSideInclude('include3', '3.html');
    	clientSideInclude('include4', '4.html');
    	clientSideInclude('include5', '5.html');
    	clientSideInclude('include6', '6.html');
    }
    and then initialize the pages in the tabs.html:

    Code:
    <script type="text/javascript">
    if(location.search!=''){
    document.getElementById('maintab').getElementsByTagName('li')[0].className=''
    document.getElementById('maintab').getElementsByTagName('li')[parseInt(unescape(location.search).replace(/\D/g, ''))].className="selected"
    }
    //Start Ajax tabs script for UL with id="maintab" Separate multiple ids each with a comma.
    startajaxtabs("maintab")
    initializeAllPage()
    </script>
    It works great locally.

    But when I put on a server in a frameset I get a JS error.
    The error is:
    Code:
    Line: 545
    Char: 1
    Error: 'document.getElementByID(...).getElementsByTagName(...)(...)' is null or not an object
    Code: 0
    I didn't get the error when I was using the original JS.
    Anyone able to help me out?

  5. #5
    Join Date
    Aug 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Basically what I need to know is:

    How can I access an elementID from .js when I have more than one frame. How to specifcy which page within the frames to get the element from.

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
  •