从侧边栏重新打开弹出窗口时 IE 浏览器挂起

发布于 2024-08-04 15:19:35 字数 1398 浏览 2 评论 0原文

我有一个侧边栏应用程序,侧边栏本身充当父窗口。通过单击链接,将从此父窗口打开一个子弹出 IM 窗口。问题是,当我们尝试关闭弹出式 IM 窗口并重新打开弹出式 IM 窗口时,再次打开弹出式 IM 窗口会有很大的时间延迟(在 ie6 中,页面无法加载)。此问题仅在 IE 浏览器中出现。它在 Firefox 中完美运行。其实为什么只有IE浏览器才会出现这种情况?是因为权限问题吗?

代码在这里,

a class="IM" href="#" title="IM" onclick='openWindow("http://localhost/myproject/web/run.php","mywindow", "width=250,height=250,status=1")'>IM

function openWindow(url,name,status)

{

尝试

{

    var WindowsNames = url.split('=');
            //Creating the contact object
    contact = rosterObj.roster[WindowsNames[1].toLowerCase()]['contact'];
            // Check whether the window connection object 'contact.chatW' exists and if there is already chat window opened 'contact.chatW.closed'
    if(contact.chatW && !contact.chatW.closed)
    {
        //Cheking for appending the chat message
        if(contact.chatW.name == name)
        {

        }
        //if the window is not opened, open the IM pop up window
        else
        {
            contact.chatW = window.open(url,name,status);
        }
    }
    //IF both the connection object and IM window is opened, will open a new pop up window
    else
    {
        contact.chatW = window.open(url,name,status);
    }
}
catch(e)
{
}

}

谢谢, 拉朱

I have a sidebar application, and the sidebar itself acts as a parent window. A child pop up IM window will open from this parent window by clicking a link. The problem is that, when we try to close the pop up IM window and reopen a pop up IM window, there is large time delay for opening the pop up IM window again ( IN ie6 the page can not be loaded). This issues is seen only in IE browser. IT works in Firefox perfectly. Actually Why this happened only for IE browser? Is it due to any permission problem?

The code is here,

a class="IM" href="#" title="IM" onclick='openWindow("http://localhost/myproject/web/run.php","mywindow",
"width=250,height=250,status=1")'>IM

function openWindow(url,name,status)

{

try

{

    var WindowsNames = url.split('=');
            //Creating the contact object
    contact = rosterObj.roster[WindowsNames[1].toLowerCase()]['contact'];
            // Check whether the window connection object 'contact.chatW' exists and if there is already chat window opened 'contact.chatW.closed'
    if(contact.chatW && !contact.chatW.closed)
    {
        //Cheking for appending the chat message
        if(contact.chatW.name == name)
        {

        }
        //if the window is not opened, open the IM pop up window
        else
        {
            contact.chatW = window.open(url,name,status);
        }
    }
    //IF both the connection object and IM window is opened, will open a new pop up window
    else
    {
        contact.chatW = window.open(url,name,status);
    }
}
catch(e)
{
}

}

Thank you,
Raju

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文