Results 1 to 5 of 5

Thread: Ext.application works in all browsers except IE9

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
      0  

    Default Answered: Ext.application works in all browsers except IE9

    Hi,

    I have a MVC Ext.application that works in Chrome, Firefox, Safari etc, but won't load in Internet Explorer 9. Though if a enable Developer Tools (F12) it will load. Any idea why this is happening? Or suggestions on how to debug what is happening?

    Regards,
    Tim

  2. Sounds like you have console.log() call(s) somewhere? Those will fail if Developer Tools is not active.

    If that is the reason you can add following to your app.js to comfort IE:

    Code:
    if (!window.console) window.console = {};
    if (!window.console.log) window.console.log = function () { };

  3. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,987
    Answers
    725
    Vote Rating
    934
      0  

    Default

    First thing to do would be to check for trailing commas.

    Code:
    Ext.define('Foo', {
        foo: function(){
        },
    
        bar: function(){
        },
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  4. #3
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
      0  

    Default

    Hi Evan,

    That doesn't appear to be the problem.

    A very simple app that doesn't work:

    Code:
    <!doctype html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>AS3 to JS/Sencha Migration</title>
        <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
        <script type="text/javascript" src="extjs/ext-all-dev.js"></script>
        <script type="text/javascript" src="app.js"></script>
    </head>
    </html>
    Code:
    Ext.onReady(function()
    {
        var button = Ext.create("Ext.Button", {
            text:"Click me",
            renderTo: Ext.getBody()
        });
        button.addListener( "click", function(e) {
            this.setText("Clicked");
        });
    });
    Regards,
    Tim

  5. #4
    Sencha Premium Member
    Join Date
    Oct 2010
    Posts
    100
    Answers
    5
    Vote Rating
    9
      1  

    Default

    Sounds like you have console.log() call(s) somewhere? Those will fail if Developer Tools is not active.

    If that is the reason you can add following to your app.js to comfort IE:

    Code:
    if (!window.console) window.console = {};
    if (!window.console.log) window.console.log = function () { };

  6. #5
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    3
    Vote Rating
    0
      0  

    Default

    That's done it. Thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •