Apr 08, 2009, 6:54 AM
[CLOSED] Bug when open window, loading mask hangs
Hi
I found a bug I really need help to fix. Please try this example, (IE7).
The way to make the bug appear is like this.
1. Click "Open window .NET"
2. Close the window
3. Click "Open window JS"
4. Close the window
5. Click "Open window .NET" again
Now the loading mask has "frozen" in the frame.
/Mikael
I found a bug I really need help to fix. Please try this example, (IE7).
The way to make the bug appear is like this.
1. Click "Open window .NET"
2. Close the window
3. Click "Open window JS"
4. Close the window
5. Click "Open window .NET" again
Now the loading mask has "frozen" in the frame.
/Mikael
<%@ Page Language="C#" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
}
public void LoadExtIFrameWindow(Coolite.Ext.Web.Window wndWindow, string strUrl, string strTitle, string strMaskMsg, string strIcon, int intWidth, int intHeight, string strBodyStyle)
{
wndwindow.Title = strTitle;
if (strBodyStyle == "")
strBodyStyle = "padding:0px;";
wndwindow.BodyStyle = strBodyStyle;
wndwindow.IconCls = strIcon;
wndwindow.SetSize(intWidth, intHeight);
wndwindow.AutoLoad.ShowMask = true;
wndwindow.AutoLoad.MaskMsg = strMaskMsg;
wndwindow.AutoLoad.Url = strUrl;
wndwindow.AutoLoad.Mode = Coolite.Ext.Web.LoadMode.IFrame;
wndwindow.Show();
wndwindow.Load();
}
protected void btnTest_click(object sender, AjaxEventArgs e)
{
LoadExtIFrameWindow(wndInfo, "http://www.google.se", "Google .NET", "", "", 400, 400, "");
}
</script>
<script type="text/javascript">
function loadWindowGeneral(wndPopupVar, url, title, width, height, iconClass) {
try {
wndPopupVar.setHeight(height);
wndPopupVar.setWidth(width);
var html = String.format("<iframe width=\"100%\" id=\"Window1_iframe\" height=\"100%\" src=\"{0}\" frameborder=\"0\"></iframe>", url)
wndPopupVar.body.update(html);
wndPopupVar.setTitle(title);
wndPopupVar.maximizable = true;
wndPopupVar.bodyBorder = false;
wndPopupVar.border = false;
wndPopupVar.plain = true;
wndPopupVar.show();
if (iconClass != "")
wndPopupVar.setIconClass(iconClass);
}
catch (e) {
Ext.Msg.alert('Error', e.message);
}
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<ext:Label runat="server" ID="TEST"></ext:Label>
<form id="form1" runat="server">
<ext:ScriptManager runat="server" ID="ScriptManager1"></ext:ScriptManager>
Open window JS
<ext:Button runat="server" ID="btnTest" Text="Open window .NET" >
<AjaxEvents><Click OnEvent="btnTest_click"></Click></AjaxEvents>
</ext:Button>
<ext:Window Border="false" Centeronload="true" ID="wndInfo" Maximizable="true" Modal="false" runat="server" Showonload="false" Collapsible="false" >
</ext:Window>
</form>
</body>
</html>