1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    13
    Vote Rating
    0
    nidea123 is on a distinguished road

      0  

    Default Problem Ext.window on Internet Explorer

    Problem Ext.window on Internet Explorer


    Hi!

    I am using ext.windows to display some information, in firefox works perfectly regrettably in IE 6-7-8 I have a problem, When I close the window calling win.hide(); produced this error: Invalid argument. ext-all.js, line 7 character 50401.

    Thanks for all your help.

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    What does your code look like? (use code tags when posting)

  3. #3
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750
    Vote Rating
    9
    fay will become famous soon enough fay will become famous soon enough

      0  

    Default


    Also use ext-all-debug.js while developing/debugging. If it is an IE-specific error message, check for trailing commas.

  4. #4
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    Quote Originally Posted by fay View Post
    Also use ext-all-debug.js while developing/debugging. If it is an IE-specific error message, check for trailing commas.
    Generally, commas prevent code from being interpreted though :-\

  5. #5
    Sencha User
    Join Date
    Jan 2010
    Posts
    13
    Vote Rating
    0
    nidea123 is on a distinguished road

      0  

    Default


    Hi everybody thanks for all your answers, I am pretty sure did not miss any commas, here is my code maybe helps:
    initialized the window:

    Code:
    if(!win){
                win = new Ext.Window({
                    applyTo:'hello-win',
                    layout:'fit',
                    width:300,
                    height: ((browserHeight*.5)-65),
                    allowDomMove : false,
                    draggable : false,
                    resizable : false,
                    closable : false,
                    plain: true,
                    bodyStyle: {"background-color":"#effbff"},
                    items: [{
                                contentEl: "descElem",
                                id:"DescEl",
                                //region: "south",
                                width:300,
                                bodyStyle: {"padding": "5px", "background-color":"#effbff"},
                                split: true,
                                //autoHeight:true,
                                border:false,
                                autoScroll: true
                            }]
                });
            }
            win.alignTo(document,"br-br", [-10, -40]);
            win.show(this);
    I also have a toggle button for open and close the window:

    Code:
    action = new Ext.Action({
                    text: " Ver Leyenda",
                    iconCls: 'leyenda',
                    enableToggle: true,
                    pressed: true,
                    toggleHandler: onItemToggle
                    });
    The toggle function:

    Code:
    function onItemToggle(item, pressed){
         
                if(pressed)
                {
                    win.alignTo(document,"br-br", [-10, -40]);
                    win.show(this);
                }
                else
                {
                    win.hide();
                }
           
        }
    Thanks everybody.

  6. #6
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    remove: applyTo:'hello-win',


    do you need it? probably not.

  7. #7
    Sencha User
    Join Date
    Jan 2010
    Posts
    13
    Vote Rating
    0
    nidea123 is on a distinguished road

      0  

    Default


    Hi jgarcia thanks for your answer:

    I am using the hello-win to display the window.

    Code:
    <div id="hello-win" class="x-hidden">
    
        <div class="x-window-header">Informacion Proyecto</div>
              
        </div>
    I should remove it?

  8. #8
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    you don't need it.

  9. #9
    Sencha User
    Join Date
    Jan 2010
    Posts
    13
    Vote Rating
    0
    nidea123 is on a distinguished road

      0  

    Default


    mm.... I remove the code and my window just disappear. I think is the win.alignTo(document,"br-br", [-10, -40]) function.

    Any idea?

  10. #10
    Sencha User
    Join Date
    Jan 2010
    Posts
    13
    Vote Rating
    0
    nidea123 is on a distinguished road

      0  

    Default


    Finally I couldn't fix the error using the hide function for Ext.window, I figured out that the problem appears because the deploying a ext.Tree component inside the window. My last option for this issue was to move the window out of the user vision.

    Code:
    function onItemToggle(item, pressed){
     
                if(pressed)
                {
                    win.alignTo(document,"tr-tr", [-10, 40]);// move in
                }
                else
                {
                    win.alignTo(document,"tr-tr", [-100, -500]);// move out
                }
     }
    Thanks for all your answers.

Thread Participants: 2