Results 1 to 8 of 8

Thread: Ajax Tabs Content script

  1. #1
    Join Date
    Sep 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Ajax Tabs Content script

    1) Script Title: Ajax Tabs Content script

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

    3) Describe problem:

    Im trying to have multiple Ajax tabs. The following script works fine if i have the tabs on the same page, i.e.

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

    <div id="ajaxcontentarea" class="contentstyle">
    <p>Default Content...</p>
    </div>

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

    </ul>

    <div id="newscontentarea" class="contentstyle">
    <p>Default Content...</p>
    </div>

    <script type="text/javascript">
    startajaxtabs("maintab", "newstab")
    </script>
    But what I'm trying to achieve is to have the second ajax tabs inside one of the page (i.e. external.htm), it then fails to work. Is it still possible to do?

    Any help is appreciated.

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

    Default

    While the external page to fetch via Ajax can contain external .css or .js files, such as those that make up the Ajax tab content script, it's buggy in some versions of IE, and basically won't work reliably. I really wouldn't recommend it, and you're better off using the inline Tab content script if one of the contents contain additional JS or CSS.

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

    Default

    How do I load another page (through a link) from within the relcontentarea?
    I've tried several options, but haven't found the solution yet

  4. #4
    Join Date
    Apr 2006
    Location
    London
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Quote Originally Posted by ddadmin
    While the external page to fetch via Ajax can contain external .css or .js files, such as those that make up the Ajax tab content script, it's buggy in some versions of IE, and basically won't work reliably. I really wouldn't recommend it, and you're better off using the inline Tab content script if one of the contents contain additional JS or CSS.
    Im using the same ajax script and trying to insert the inline script you suggested inside the ajax script.
    I've mentioned the tabcontent.js and tabcontent.css in the ajax list for it to load, and inspite of that the inline tab script dosent show its content when displayed in one of the ajax tabs.

    HELP!!!

    thanks


    VatsaL

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

    Default ajax tabs content ignoring charsets

    I use ajax tabs loading external htmlpages on the fly. And generally the script works fine -> as long as i do not use special characters like ü ä ß and so on - characters of german language.

    the main page, that uses ajax tab-scripts has charset=iso-8859-1. when requesting an external page containing one of the above special chars, they are then displayed faulty. e.g. in firefox it is a questionmark.

    seems, as if the characters are getting lost through the xmlbased request, ajax uses.

    is there a way to tell ajax, that these special chars should be managed in a certain way? and if so - in which part of the script shall i include it?

    can anyone help?

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

    Default

    Quote Originally Posted by Metellus View Post
    I use ajax tabs loading external htmlpages on the fly. And generally the script works fine -> as long as i do not use special characters like ü ä ß and so on - characters of german language.

    the main page, that uses ajax tab-scripts has charset=iso-8859-1. when requesting an external page containing one of the above special chars, they are then displayed faulty. e.g. in firefox it is a questionmark.

    seems, as if the characters are getting lost through the xmlbased request, ajax uses.

    is there a way to tell ajax, that these special chars should be managed in a certain way? and if so - in which part of the script shall i include it?

    can anyone help?
    Hi!

    Not Seeing this is a bit late I guess you may have solved it already. I'll post the solution anyway since someone else might be interested :)

    I've had your problem as well, but with swedish characters, all I had to do was insert
    Code:
    header('Content-type: text/html; charset=ISO-8859-1');
    just below the opening php tag in whatever file i had the tabs script fetch.

    You'll of course have to put your own charset there if this is wrong for you.

    Cheers

  7. #7
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Help me please

    Sorry dear friend, but i don't in you when you say just below the opening php, what do you mean friend?, i would like you explain me please, because I am trying to make this to much time... because I tried to make that you say, but it does not work... or maybe I am doing something wrong

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

    Default

    Sorry, haven't logged on in a while. This is an opening tag

    Code:
    <?php
    Usually at the top of a php page

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
  •