Object doesn't support this property or method (IE SWFObject bug)

  • Hi,

    I just found out that my site doesn't work on IE and on Mac too like Tuur said. I'm narrowing it down, I'll fix the IE the part first coz I don't have mac. It's working fine with firefox, safari, google chrome. Anyway, the part that's not working on IE is when I use javascript to call a krpano/swf object function. I've tried researching about SWFObject and IE bugs but so far couldn't find anything that would help me.

    Anyone encountered this before?

    function lookToHotspot(hotspot)
    {
    try
    {
    var krpano = document.getElementById("krpanoSWFObject");
    krpano.call("looktohotspot("+hotspot+")"); //This is where it doesn't work
    }
    catch(err)
    {
    alert(err.message);
    }
    }

    thanks,
    Milo

  • Hi,

    I found the solution here

    http://www.rednas.be/news/43/swfobj…lorer-error-fix

    So instead of loading the krpano from the html file like this.

    <div id="krpanoDIV">
    <script type="text/javascript">
    loadKrPano();
    </script>
    <noscript>ERROR: no Javascript</noscript>
    </div>

    I moved it to a dom ready function in my external javascript file

    YAHOO.util.Event.onDOMReady(
    function ()
    {
    loadKrPano();
    }
    );

    Im using yui utilities not sure how to do it in just plain javascript.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!