PDA

View Full Version : Problem Ext.window on Internet Explorer



nidea123
25 Apr 2010, 7:15 PM
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.

jay@moduscreate.com
26 Apr 2010, 5:19 AM
What does your code look like? (use code tags when posting)

fay
26 Apr 2010, 5:33 AM
Also use ext-all-debug.js while developing/debugging. If it is an IE-specific error message, check for trailing commas (http://www.extjs.com/learn/Ext_FAQ_Errors#My_code_does_not_work_in_Internet_Explorer.2C_but_it_works_fine_in_Firefox).

jay@moduscreate.com
26 Apr 2010, 5:39 AM
Also use ext-all-debug.js while developing/debugging. If it is an IE-specific error message, check for trailing commas (http://www.extjs.com/learn/Ext_FAQ_Errors#My_code_does_not_work_in_Internet_Explorer.2C_but_it_works_fine_in_Firefox).

Generally, commas prevent code from being interpreted though :-\

nidea123
26 Apr 2010, 6:20 AM
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:



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:



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


The toggle function:



function onItemToggle(item, pressed){

if(pressed)
{
win.alignTo(document,"br-br", [-10, -40]);
win.show(this);
}
else
{
win.hide();
}

}


Thanks everybody.

jay@moduscreate.com
26 Apr 2010, 6:33 AM
remove: applyTo:'hello-win',


do you need it? probably not.

nidea123
26 Apr 2010, 7:04 AM
Hi jgarcia thanks for your answer:

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




<div id="hello-win" class="x-hidden">

<div class="x-window-header">Informacion Proyecto</div>

</div>


I should remove it?

jay@moduscreate.com
26 Apr 2010, 7:20 AM
you don't need it.

nidea123
26 Apr 2010, 4:16 PM
mm.... I remove the code and my window just disappear. I think is the win.alignTo(document,"br-br", [-10, -40]) function.

Any idea?

nidea123
30 Apr 2010, 3:08 PM
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.



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.