Results 1 to 4 of 4

Thread: Using javascript in Ajax Tabs Content's tabs?

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

    Question Using javascript in Ajax Tabs Content's tabs?

    1) Script Title:
    Ajax Tabs Content script

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

    3) Describe problem:
    One of the pages I use as a tab has a few rows of simple javascript code - it toggles the visibility of a some item. When watching the page alone, it works fine, but when it's included as a tab it seems that everything inside a <script> tag is simply ignored, and I can't toggle the item.

    What can I do?
    I've read you don't support using the same script twice or stuff like that, but it's not a script problem, it's that I can't write *any* script at all in the tab...

    Thank you!

  2. #2
    Join Date
    Jul 2007
    Location
    Japan
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is how I get javascript to work in the Ajax Tabs script.

    Instead of referencing the page directly in the Ajax Tabs I use and iframe. First I create an html file and add iframe code to reference the page that I actually want to appear in the tab content area. Then in the tab script I reference the iframe html file and it pulls in the actual content. This way the javascript gets loaded and the tabs work great.

    You can check out some examples on my site. www.whatwouldjesusdownload.com

    The news section is an RSS to Javscript feed.

    I hope this helps.

    I may post a How To for this if it is helpful.

    Thanks, Jereme

  3. #3
    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

    Sounds feasible, mhancoc7. And, since you're using it that way, it must work. Another workable (for many cases) approach is outlined here:

    http://www.dynamicdrive.com/forums/s...ad.php?t=17426
    - John
    ________________________

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

  4. #4
    Join Date
    Jul 2007
    Location
    Japan
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Sounds feasible, mhancoc7. And, since you're using it that way, it must work. Another workable (for many cases) approach is outlined here:

    http://www.dynamicdrive.com/forums/s...ad.php?t=17426
    Yeah, it is a little tricky getting the iframes just right especially if you are using the script in a joomla template like me.

    I like your method, but I never got around to trying it. My iframe idea came to me in my sleep, literally.

    Thanks, Jereme

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
  •