Results 1 to 3 of 3

Thread: Switch Content. Object Required Error from IE 6

  1. #1
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Switch Content. Object Required Error from IE 6

    1) Script Title: Switch Content

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

    3) Describe problem: No problems with any other browsers, only IE 6. Unfortunately a lot of our visitors are still using this browser so I would like to see if the error can be eliminated.
    Expanding or collapsing any content triggers an IE error:
    Line: 93
    Char: 25
    Error: Object required
    Code: 0
    Despite the error, the page works and content can be expanded and collapsed.
    Test page up at http://www.yesispeakenglish.com/r03/en/faq.php

    I have tried a search and was able to find out how poplular IE 6 is around here, but nothing that would point me in the right directlon.
    Thank you.
    (I am very new at all of this)

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,925
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    It's also an error in IE 7, 8, and 9. IE 9 could handle it if the page weren't in quirksmode. But 6, 7, 8 can't deal with it either way.

    And it's not an error in the Switch Content script, although I'm pretty sure there's something in there that's involved in some way, but perhaps not. The error is from the SpringMetrics tracker script, specifically the a.js file which SpringMetrics tracker imports to the page:

    Code:
    var _springMetq = _springMetq || [];
     _springMetq.push(['id', '0f2640392b']);
     (
      function(){
       var s = document.createElement('script');
       s.type = 'text/javascript';
       s.async = true;
       s.src = ('https:' == document.location.protocol ? 'https://d3rmnwi2tssrfx.cloudfront.net/a.js' : 'http://static.springmetrics.com/a.js');
       var x = document.getElementsByTagName('script')[0];
       x.parentNode.insertBefore(s, x);
      }
     )();
    If you were to remove all that code the error should go away.

    Or you could comment it out for all IE:

    Code:
    <script type='text/javascript'>
    /*@cc_on @*/
    /*@if(@_jscript_version >= 5)
    if(1 !== 1){
    @end @*/
    var _springMetq = _springMetq || [];
     _springMetq.push(['id', '0f2640392b']);
     (
      function(){
       var s = document.createElement('script');
       s.type = 'text/javascript';
       s.async = true;
       s.src = ('https:' == document.location.protocol ? 'https://d3rmnwi2tssrfx.cloudfront.net/a.js' : 'http://static.springmetrics.com/a.js');
       var x = document.getElementsByTagName('script')[0];
       x.parentNode.insertBefore(s, x);
      }
     )();
    /*@if(@_jscript_version >= 5)
    }
    @end @*/
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    </script>
    - 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:

    azaniaman (12-03-2011)

  4. #3
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    John, thank you for nailing this one. I have spent days searching and trying whatever I could find but never got anywhere.
    In my searches I kind of got to know you and knew that you would know what the problem was. It is amazing so see you post a solution ... and so quickly.
    My sincere thanks.

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
  •