PDA

View Full Version : [CLOSED] Alert goes wrong when the page is not visible



RCN
Nov 18, 2014, 6:47 PM
On the following example, if you wait 3 seconds, the alert will be shown as expected within Index 1 tab.

http://forums.ext.net/attachment.php?attachmentid=16341&stc=1

But if the browser is refreshed (F5), and you set Index 2 as the active tab before the three seconds elapse

http://forums.ext.net/attachment.php?attachmentid=16351&stc=1

and then, wait more than 3 seconds. When you set Index 1 as the active tab, the Alert went wrong

http://forums.ext.net/attachment.php?attachmentid=16361&stc=1


INDEX



<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:TabPanel Margin="30" Width="500" Height="500" runat="server">
<Items>
<ext:Panel Title="Index 1" runat="server">
<Loader Url="Index1" Mode="Frame" runat="server" />
</ext:Panel>
<ext:Panel Title="Index 2" runat="server">
<Loader Url="Index2" Mode="Frame" runat="server" />
</ext:Panel>
</Items>
</ext:TabPanel>
</body>
</html>




INDEX 1


<!DOCTYPE html>
<script type="text/javascript">
var documentReady = function () {
setTimeout(function () {
Ext.Msg.alert("Ext.Net", "Index 1");
}, 3000);
}
</script>
<html>
<head runat="server">
<title>Index1</title>
</head>
<body>
<ext:ResourceManager runat="server">
<Listeners>
<DocumentReady Handler="documentReady()" />
</Listeners>
</ext:ResourceManager>
INDEX 1
</body>
</html>




INDEX 2


<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
INDEX 2
</body>
</html>



Any ideas to overcome this issue?

Thanks in advance

Daniil
Nov 19, 2014, 5:13 AM
Hi Raphael,

HideMode="Offsets" helps.

<ext:Panel Title="Index 1" runat="server" HideMode="Offsets">

RCN
Nov 19, 2014, 9:55 AM
Thank you Daniil. Please mark this thread as closed.