PDA

View Full Version : "Sliding message box" issue with IE



stetou
14 Sep 2009, 7:13 AM
Hi,
I posted this thread on the ext 2.2 list already. I'm trying to get help here since I get the same problem using extjs 3.0.0

Based on this status bar example
http://www.extjs.com/deploy/dev/exam...enu/menus.html (http://www.extjs.com/deploy/dev/examples/menu/menus.html)
I want to show this sliding box (click on Toggle me button in the example).

The example insert the msg-div on the document.body but me I add it on a GeoExt mappanel.
In firefox the box appears, stay a few seconds and disapear as expected.

In IE6,IE7,IE8, the box appears, then hides a few seconds, reappear and immediatly disapear.

Here is the code. Anyone has suggestion on what IE doesn't digest?


function createBox(t, s)
{
return ['<div class="msg">',
'<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>',
'<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t, '</h3>', s, '</div></div></div>',
'<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>',
'</div>'].join('');
}

function showSlideMsgBox(title, format)
{
var msgCt;
var mappanel = Ext.getCmp('map_panel');
if(!msgCt)
{
msgCt = Ext.DomHelper.insertAfter(mappanel.body, {id:'msg-div'}, true);
}
msgCt.alignTo(mappanel.body,'tl-tl');
var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);
m.slideIn('t').pause(3).ghost("t", {remove:true});
}

thanks
Steve