Results 1 to 9 of 9

Thread: Ajax Content Tabs

  1. #1
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Content Tabs

    Ajax Content Tabs
    http://www.dynamicdrive.com/dynamici...axtabscontent/

    What variable would I need to use to include the aforementioned script in an "body onload" command?

    I ask because there does not seem to be any "window onload" command in the script.

    I would appreciate any advice that you could give.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There is no onload event required for this script.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is it possible to use one?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yes but, why? What for?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    I have a website that I have created using a third-party AJAX script (to save bandwidth) which I know you don't support, but after some research, I have discovered that I can use the onload function to load two or more javascripts in the same page.

    I have tested it over the past few hours with a variety of scripts (dynamic images replacement/content/gallery/poll/etc), and all have worked by taking the window onload command and adding it to a body onload command, all except this script because I can't figure an onload command for the script.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, as I said, it has no onload command. This is what happens as the page loads (not onload) though:

    Code:
    <script type="text/javascript">
    //Start Ajax tabs script for UL with id="maintab" Separate multiple ids each with a comma.
    startajaxtabs("maintab")
    </script>
    As long as you have that below the the HTML markup for the tabs, the script should work on any page as long as there is no conflict with another script(s).

    I think what may have you confused is that there can be other conflicts between two scripts. The onload conflict is a common one but shared function names, variable names and other things can also cause conflicts between two scripts.

    Either that, or you are looking to resolve a conflict that doesn't exist.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have checked for conflicts within my limited knowledge, (still a learner) and the functions all have different names other than a couple of loadobj commands, could that be the conflict?

    Or is it more likely to be because the actual content is in one file containing only the content of a specific div, while I have tried the js meta tag in the main page?

    I'll try fiddling with it a little more because it's a beautiful script and perfect for what I want, the other alternative is to replicate the script I already use for the main file system with a few changes, which to be honest, is probably way beyond my level at the moment.

    Thanks for the input though, it's appreciated, it's given me something to play/experiment with.

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It is hard to say for sure without a link to your page, even then it would be hard but, hopefully not impossible to tell. If two scripts both use loadobjs(), that is a function and each script will have its own version, whichever version is read (parsed) by the browser last, will be the active version. I don't understand the other thing you mentioned. Not enough information.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Jun 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The direct link to the test site is http://livetest.ourbloody.com, though I have fiddled with it to oblivion at the moment...(click stille nacht)

    As you'll see, I have managed to mangle the two styles together by adding the css to the styles, but when you click a tab in the script from here it loads the actual page rather than loading it in the correct div specified by the script.

    For a better example of the pages I am trying to integrate it into simply http://ourbloody.com would be better, that's the unaltered original script

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
  •