We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29703
    • 217 Posts
    Hello all,

    I’m having issues with <=IE6 spitting up error messages on my ModX site when I use the SWFObject snippet.

    I’m getting the error:

    "Internet Explorer cannot open the Internet site http://www....etc..
    Operation aborted"

    I’ve researched the problem and apparently the order of which the javascript is called in the <head> can cause this.

    Is there any way I can force the SWFObject snippet to call it earlier in the <head>? I’ve tried disabling the snippet and it works fine.

    Site in question = http://www.papermillyard.com/index.php?id=2

    Many thanks.
      • 4310
      • 2,310 Posts
      I use SWFObject not in a snippet without any problems in IE6.
      I just reference the file in the <head> section and have:
      <div id="tvadHead">
      
      			<a href="http://www.adobe.com/go/getflashplayer">
      				<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
      			</a>
      		</div>
      <script type="text/javascript">
      var fo = new SWFObject("assets/flash/crickwebad.swf", "tvadHead", "468", "60", "8", "#FFFFFF");
      fo.addVariable("variable", "varvalue");
      fo.write("tvadHead");
      
      </script> 
      </div>

      In the body.
      The actual code is after the div in which the flash banner appears.
        • 7231
        • 4,205 Posts
        I had an issue with SWFObject with IE6 that I was able to resolve by adding defer="defer" to the script declaration so that it goes:
        <script type="text/javascript" defer="defer">


        If I remember correctly you need to edit the swfobject.class.php file and add defer="defer" to the $js variable. Note that this is needed at 2 locations, one for the static and the other for the dynamic.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 29703
          • 217 Posts
          Quote from: ganeshXL at Apr 21, 2008, 07:01 PM

          Use
          <base href="http://www.papermillyard.com/"></base>
          instead of
          <base href="http://www.papermillyard.com/"/>

          Sometimes it helps... some older browsers act stupid if you use the short form.

          I wasn’t expecting that to work, but it did! Thanks.