从侧边栏重新打开弹出窗口时 IE 浏览器挂起
我有一个侧边栏应用程序,侧边栏本身充当父窗口。通过单击链接,将从此父窗口打开一个子弹出 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论