Hybrid View

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    12
    Vote Rating
    1
    RedactiePartners is on a distinguished road

      0  

    Default Internet Explorer Fallback

    Internet Explorer Fallback


    Dear Sencha,

    One of our designers created alot of pages using Sencha Animator.

    I noticed that even though there are almost no animation, it does not load at all in internet explorer 7 or 8.
    I mean there must be some way to atleast get the project to load at all in these browser.
    In all it's basicness it just loads alot of <img> tags with images.
    but even that won't load.

    I already added a check/fallback for the window.addEventListener, cause IE8 only has the "attachEvent" event.

    But man this sucks...

  2. #2
    Sencha User
    Join Date
    Jun 2012
    Posts
    12
    Vote Rating
    1
    RedactiePartners is on a distinguished road

      0  

    Default


    Alright so quick update.

    I'm rewriting ALOT of code just so it works with older IE browsers.
    I use ALOT of IE IF in the head now, just to target multiple browsers for now.
    this isn't really recommended but it works for now.

    see:
    Code:
    <!--[if IE]><link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if IE 8]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if IE 9]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if gte IE 8]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if lt IE 9]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if gt IE 6]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if !IE]> -->
    <link rel="stylesheet" type="text/css" href="style.css">
    <!-- <![endif]-->
    My problem now is, the whole controller.js does not start at all in IE, how do I get the controller.js to start in IE I used the attachEvent registration, I tried jQuery, I tried window.onload I tried document.body.onload = function... IE will not run Javascript at all.

    jscript.dll is registered, IE is allowed to run scripts.

    This is a huge problem, cause the JS Dynamically sets up the whole project (addClass 'run' for instance.)

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    12
    Vote Rating
    1
    RedactiePartners is on a distinguished road

      0  

    Default


    Alright so quick update.

    I'm rewriting ALOT of code just so it works with older IE browsers.
    I use ALOT of IE IF in the head now, just to target multiple browsers for now.
    this isn't really recommended but it works for now.

    see:
    Code:
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if IE 8]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if IE 9]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if gte IE 8]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if lt IE 9]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if gt IE 6]>
    <link rel="stylesheet" type="text/css" href="ie.css">
    <![endif]-->
    <!--[if !IE]> -->
    <link rel="stylesheet" type="text/css" href="style.css">
    <!-- <![endif]-->
    My problem now is, the whole controller.js does not start at all in IE, how do I get the controller.js to start in IE I used the attachEvent registration, I tried jQuery, I tried window.onload I tried document.body.onload = function... IE will not run Javascript at all.

    jscript.dll is registered, IE is allowed to run scripts.

    This is a huge problem, cause the JS Dynamically sets up the whole project (addClass 'run' for instance.)

  4. #4
    Sencha User
    Join Date
    Jun 2012
    Posts
    12
    Vote Rating
    1
    RedactiePartners is on a distinguished road

      0  

    Default Semi Cross Browser fix

    Semi Cross Browser fix


    Okay, maybe our designer did something wrong.

    Besides the fact that the project was 68 Scenes, it only ever worked in Chrome, that was the only browser that could handle this project.

    I rewrote about 3500 lines of code (CSS and JS) to get it atleast to load on All browsers.
    My only problem now is that chrome is the only browser that acts upon the click events.

    What I did is create a bindEvent that would check wich event was available:

    Code:
    function bindEvent(el, eventName, eventHandler) {  if (el.addEventListener){
        el.addEventListener(eventName, eventHandler, false); 
      } else if (el.attachEvent){
        el.attachEvent('on'+eventName, eventHandler);
      }
    }
    And then I deleted the window.load event it originally used and made that a loadData function.

    then use
    Code:
    bindEvent(window, "load", loadData);
    to load the the first function for either IE or Chrome/FF

    The same function is used in the setupListeners to setup the correct listeners for crossbrowser:
    Code:
    setupListeners: function () {
            var me = this;
            var eventName = "webkitAnimationEnd";
            if (document.body.style.MozAnimationName !== undefined) {
                eventName = "animationend";
                this.browser = "moz";
            }
    
    
            function addMousemoveListenerTo(scene) {
                bindEvent(scene.element, 'mousemove', function (event) {
                    scene.mousemoveAction(me, event);
                }, false);
            }
            var scene;
            for (var i = 0; i < this.scenesArray.length; i++) {
                scene = this.scenesArray[i];
                if (scene.mousemoveAction) {
                    addMousemoveListenerTo(scene);
                }
            }
    
    
            function addListenerTo(element, eventType, aFunction) {
                bindEvent(element, eventType, function (event) {
                    aFunction(me);
                }, false);
            }
    
    
            var element, event;
            for (var i = 0; i < this.events.length; i++) {
                event = this.events[i];
                element = document.getElementById(event.id);
                addListenerTo(element, event.type, event.handler);
            }
        },
    That's all I changed for the JS file, it works except for the last block, the click events are not being registered in FF and IE, Chrome and Safari work perfectly.

    anyway:
    https://content.redactiepartners.nl/FDMag/

  5. #5
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Vote Rating
    10
    arnebech will become famous soon enough

      0  

    Default


    IE is not supported by Animator and there is not built in fallback for older browsers at the moment. So making it work in IE is going to take some work specially for a bigger project as yours.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi