1. #1
    Ext User
    Join Date
    Aug 2007
    Posts
    22
    Vote Rating
    0
    blackwaterdev is on a distinguished road

      0  

    Default Code won't work in IE7, no JS errors, just doesn't work

    Code won't work in IE7, no JS errors, just doesn't work


    I have some EXT code consisting of a layout and tree, the code runs fine in firefox and camino but when I view it in IE7, it doesn't appear to execute the js. I know js is turned on as I added a basic alert and that kicked off. My page is an https page and when I go to it I get the IE error of "this page contains secure and non secure..blah". When my page is loaded in IE7, I just see the dcsafdsa.... Here is my page code. Any suggestions are greatly appreciated! Thanks!


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>mysite</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
    <script type="text/javascript" src="/js/ext-1.1/adapter/ext/ext-base.js"></script>

    <link rel="stylesheet" type="text/css" href="/js/ext-1.1/resources/css/ext-all.css" />
    <script type="text/javascript" src="/js/ext-1.1/adapter/yui/yui-utilities.js"></script>

    <script type="text/javascript" src="/js/ext-1.1/adapter/yui/ext-yui-adapter.js"></script>
    <script src="/js/jquery.js"></script>
    <script src="/js/ext-1.1/ext-all.js"></script>

    <script type="text/javascript">

    var tree_data = /*json data removed for posting*/
    var sessionId = "goblygooko";
    </script>
    <script type="text/javascript" src="/js/monitors/monitor_forms.js"></script>
    </head>
    <body>
    <div id ="container">
    <div id="west" class="x-layout-inactive-content">
    <div id="tree"></div>
    </div>
    <div id="center1" class="x-layout-inactive-content">
    dcsafdsafdasfdas
    </div>
    </div>
    </body>
    </html>



    And here is my monitor_forms.js


    function showDetails(id) {
    params = {
    "PHPSESSID": sessionId,
    "id": id,
    "detail":"1",
    }

    $.get("monitors_detail.adm", params, function(content) {
    $("#center1").html(content);
    });
    }

    Ext.onReady(function(){

    /**
    * The layout, we just need a west and center for now
    *
    *
    */
    layout = new Ext.BorderLayout(document.body, {
    west: {
    split:true,
    initialSize: 200,
    minSize: 175,
    maxSize: 400,
    titlebar: true,
    collapsible: true,
    animate: true
    },
    center: {
    titlebar: true,
    autoScroll:true,
    closeOnTab: true
    }
    });

    layout.beginUpdate();
    layout.add('west', new Ext.ContentPanel('west', {title: 'MSR List'}));
    layout.add('center', new Ext.ContentPanel('center1', {title: 'Details', closable: true}));
    layout.getRegion('center').showPanel('center1');
    layout.endUpdate();
    /**
    * The treenode for the employees, this data will come dynamically from the main form
    *
    *
    */
    var Tree = Ext.tree;
    var tree = new Tree.TreePanel('tree', {
    animate:true,
    enableDD:false,
    loader: new Tree.TreeLoader(), // Note: no dataurl, register a TreeLoader to make use of createNode()
    lines: true,
    selModel: new Ext.tree.MultiSelectionModel(),
    containerScroll: false
    });

    // set the root node
    var root = new Tree.TreeNode({
    text: 'People',
    draggable:false,
    id:'source'
    });
    tree.on('click', function(n){
    if(n.isLeaf()){
    showDetails(n.attributes.id);
    }
    });

    tree.setRootNode(root);
    // json data describing the tree

    for(var i = 0, len = tree_data.length; i < len; i++) {
    root.appendChild(tree.getLoader().createNode(tree_data[i]));
    }
    tree.render();
    root.expand();

    });

  2. #2
    Ext JS - Development Team J.C. Bize's Avatar
    Join Date
    May 2007
    Location
    Bay Area, CA
    Posts
    179
    Vote Rating
    0
    J.C. Bize is on a distinguished road

      0  

    Default


    I just took a quick glance at your code and it looks like you've got an extra comma here:

    Code:
    function showDetails(id) {
    params = {
    "PHPSESSID": sessionId,
    "id": id,
    "detail":"1",
    }
    You may want to check out the following thread: do u have extra comma? ok, ie will destroy your application!

    This may not be the problem (I took a 30s glance), but it can't help

    Cheers,
    JC

  3. #3
    Ext User
    Join Date
    Aug 2007
    Posts
    22
    Vote Rating
    0
    blackwaterdev is on a distinguished road

      0  

    Default


    Thanks JC. As soon as I get back to an windows machine, I'll try it out without the extra comma.

    Thanks again, it's always good to get another set of eyes!

  4. #4
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831
    Vote Rating
    2
    BernardChhun will become famous soon enough

      0  

    Default


    Quote Originally Posted by blackwaterdev View Post
    Thanks again, it's always good to get another set of eyes!
    either that or JSLINT!

  5. #5
    Ext User
    Join Date
    Aug 2007
    Posts
    22
    Vote Rating
    0
    blackwaterdev is on a distinguished road

      0  

    Default


    I removed the extra comma but the code still does not work. I don't get any type of js errors, it just doesn't seem to process the code. IE7 does seem to complain about certificate errors though as this is a https site but is in a sandbox without a valid certificate.

    Thanks!

  6. #6
    Ext User
    Join Date
    Sep 2007
    Posts
    11
    Vote Rating
    0
    Acaeris is on a distinguished road

      0  

    Default


    The security errors is probably just due to the ext-all.js file referencing http://extjs.com/s.gif as a spacer image. Had the same problem myself, but was fairly easy to spot.

  7. #7
    Ext User
    Join Date
    Aug 2007
    Posts
    22
    Vote Rating
    0
    blackwaterdev is on a distinguished road

      0  

    Default


    But would that cause IE 6/7 to not process the code? It acts like the js isn't even there yet if I do a basic alert, that is displayed but not my layout and tree.