Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Ajax Tabs Content script v2.2 problem IE

  1. #1
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Ajax Tabs Content script v2.2 problem IE

    Hi

    I am new here and have a script Ajax Tabs Content script v2.2 that I cant get to work with IE. Everything works fine in Firefox but not IE.

    where I get an error with IE on this line..

    'document.getElementById(...)' is null or not an object ajaxtabs.js, line 17 character 2

    ----
    this.tabs=document.getElementById(tabinterfaceid).getElementsByTagName("a") //Get all tab links within container

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0;
    Message: 'document.getElementById(...)' is null or not an object
    Line: 17
    Char: 2
    Code: 0
    URI: /mod_tpajaxtabs/ajaxtabs/ajaxtabs.js


    Message: Object doesn't support this property or method
    Line: 59
    Char: 102
    Code: 0
    URI:/js/mootools.js


    Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
    Line: 0
    Char: 0
    Code: 0

    any help what to do?

    rgds

  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

    In future, please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.


    Sounds like a table might be involved, or you may have initialized inside the target element. But I'd have to see the page to be sure. If that's it though, we can move the initialization (the part like this):

    Code:
    <script type="text/javascript">
    
    var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
    countries.setpersist(true)
    countries.setselectedClassTarget("link") //"link" or "linkparent"
    countries.init()
    
    </script>
    until after the table or target element's closing tag. IE can be finicky about tables that way, and many browsers will even let you write to an open target element, but not IE.

    If you want more help:

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ssnobben (11-07-2009)

  4. #3
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    Thanks John thats very kind of you!!

    This problem is driving me nuts though I am not a coder, designer or developer really.

    But I have this Joomla site I have done and the only thing that stopping it from working correctly is those ajax tabs that breaks in IE...

    here is the url: http://www.travelmate.com There is 3 ajax tabs. One in the right column one set up in bread crumb and one in the right column that you cant see in IE bcs it breaks and stops rendering the whole page...

    Any tips very much appreciated!

    Thanks!

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

    First thing I'd try is following the script's installation instructions, placing the initialization for each set of tabs after its corresponding tab group. Relying upon the:

    Code:
    window.addEvent('domready', fun . . .
    construct may not be adequate for all browsers.
    - John
    ________________________

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

  6. #5
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    Script: DD Tab Menu
    http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm

    So what do you suggest how to solve this? I am not a techie guy but I can copy and paste code anyhow? lol

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

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    That said, the suggestion in my previous post was as regards:

    Quote Originally Posted by ssnobben View Post
    Ajax Tabs Content script v2.2
    Which is here:

    http://www.dynamicdrive.com/dynamici...tent/index.htm

    Not as regards:

    Quote Originally Posted by ssnobben View Post
    So I think you should first determine which script you are using. Hint - it looks like the first one - I at least saw code attached to the page for Ajax Tabs Content script v2.2 and the below quoted code appears to reference Ajax Tabs Content script v2.2. Though I could be wrong about that being the script you are having a problem with because there are so many scripts on that page, and I only originally looked for the one you first said that you were using.

    However, neither script says to use (from your page's source code):

    Code:
    window.addEvent('domready', function() {var tpat70384049707=new ddajaxtabs("tpajaxtabs70384049707tabs", "tpajaxtabs70384049707divcontainer");tpat70384049707.setpersist(true);tpat70384049707.setselectedClassTarget("link");tpat70384049707.init();});
    So my suggestion was to get rid of that, and to use instead the actual initialization method as recommended for whatever script you are using. This information can be found on the script's demo page.
    - John
    ________________________

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

  8. #7
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Talking

    Hi John,

    you are correct I see that script there now Ajax Tabs Content script v2.2.

    About the usage term I see in the module has already this reference that is there in the file ajaxtabs.js.

    //** Ajax Tabs Content script v2.0- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
    //** Updated Oct 21st, 07 to version 2.0. Contains numerous improvements
    //** Updated Feb 18th, 08 to version 2.1: Adds a public "tabinstance.cycleit(dir)" method to cycle forward or backward between tabs dynamically. Only .js file changed from v2.0.
    //** Updated April 8th, 08 to version 2.2:
    // -Adds support for expanding a tab using a URL parameter (ie: http://mysite.com/tabcontent.htm?tabinterfaceid=0)
    // -Modified Ajax routine so testing the script out locally in IE7 now works

    How can I make it work with the script tag?

    Could I just paste this code below this as you mentioned there for this file ajaxtabs.js and change to <script src="ajaxtabs.js" ?

    <script src="countdown.js" type="text/javascript">
    /***********************************************
    * Dynamic Countdown script- © Dynamic Drive (http://www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit http://www.dynamicdrive.com/ for this script and 100s more.
    ***********************************************/
    </script>

    rgds

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

    View the source code of the demo.htm file:

    http://www.dynamicdrive.com/dynamici...ntent/demo.htm

    which is also available in the archive you should have downloaded for this script from its main demo page.

    There you will find a perfect example of the credit:

    Code:
    <script type="text/javascript" src="ajaxtabs/ajaxtabs.js">
    
    /***********************************************
    * Ajax Tabs Content script v2.2- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    </script>
    as well as typical on page usage for this script.
    - John
    ________________________

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

  10. #9
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    Hi John,

    I have copy and pasted this now into this ajax module where the ajaxtab.js is. Hope everything is fine..

    Seems to work for the site and this is where this ajaxtabs belong in the site.

    can you pls check it if correct?

    rgds

  11. #10
    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

    The credit is still not showing up in the served source code of page. Probably it is because it is a script and because you are using an 'AJAX module' for this. This probably also accounts for the non-standard initialization I previously mentioned. An ordinary include might be better. Does your package allow for those?
    - John
    ________________________

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

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
  •