IE6上打开弹出窗口的问题 [英] problem with open popup on IE6

查看:52
本文介绍了IE6上打开弹出窗口的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我不认为自己是javascript专家 - 但到目前为止

无论我知道什么,都帮助我实现了目标。最近我开始在我写的一个应用程序中打开一个弹出窗口

窗口,体验了很多javascript错误。


错误消息非常多样:对象不支持此

属性或方法或未指定的错误。或被叫方(服务器[不是

服务器应用程序])不可用并消失;所有连接

无效。电话没有执行。它们都出现在相同的

函数openPopup中。


我所有的客户都使用Windows XP和IE6,他们有弹出窗口阻止器

关闭;我也不知道安装了其他软件(比如搜索

工具栏等)。他们中的一些人告诉我,在重新启动计算机后,问题就会消失一段时间。这不是

一致的,即使在相同的

计算机上也没有经验。


功能每次尝试重复使用相同的弹出窗口。我将在代码下方发布



// ***代码开头***


var refPopupWindow = null;


// ........


函数openPopup(aUrl){

if(refPopupWindow)refPopupWindow.close();

refPopupWindow =

window.open(aUrl,''refPopupWindow'',''left = 0,top = 0,olbar = 0,menubar = 0,dependent = 1,location = 0,scrollbar s = 1,resizable = 1,width = 500,height = 300'');

if(( refPopupWindow)&&(typeof(refPopupWindow)==''object'')&&

(refPopupWindow.focus))

refPopupWindow.focus() ;

其他

提醒(''无法打开弹出窗口'');

}


// ***代码结束***


对于正在关闭或

尝试关注窗口的行,通常会抛出错误。我不知道这是否是打开一个可重复使用的弹出窗口的最佳方式,或者这是否是推荐的弹出窗口。

编码的方式。


任何建议,评论家或任何其他想法将不胜感激 - 它是

被很长一段时间,我无法想出这一个。


谢谢,

Dan

Hi everybody,

I would not consider myself an expert in javascript - but so far
whatever I know, helped me reaching my goals. Recently I started to
experience a lot of javascript errors related to opening up a popup
window in an application I wrote.

The error messages are quite diverse: "Object doesn''t support this
property or method" or "Unspecified error." or "The callee (server [not
server application]) is not available and disappeared; all connections
are invalid. The call did not execute.". They all occur in same
function "openPopup".

All my clients use Windows XP and IE6 and they have popup blockers
turned off; also there is no other software installed (like search
toolbars, etc) that I know of. Some of them told me that after
restarting the computer the problem goes away for a while. It''s not
consistent and it''s not experienced constantly even on the same
computer.

The function is trying to re-use same popup window every time. I will
post below the code:

//*** CODE Begin ***

var refPopupWindow = null;

// ........

function openPopup(aUrl) {
if (refPopupWindow) refPopupWindow.close();
refPopupWindow =
window.open(aUrl,''refPopupWindow'',''left=0,top=0,to olbar=0,menubar=0,dependant=1,location=0,scrollbar s=1,resizable=1,width=500,height=300'');
if ((refPopupWindow) && (typeof(refPopupWindow) == ''object'') &&
(refPopupWindow.focus))
refPopupWindow.focus();
else
alert(''Unable to open popup window'');
}

//*** CODE End ***

The errors are usually thrown for lines that either are closing or
trying to focus on window. I don''t know if this is the best way of
opening a re-usable popup window or if this is the "recommended" way of
coding it.

Any suggestions, critics or any other ideas would be appreciated - It''s
been quite a while and I cannot figure this one out.

Thanks,
Dan

推荐答案



ldan写道:

ldan wrote:
我的所有客户都使用Windows XP和IE6,他们有弹出窗口拦截器
关闭;我也不知道安装了其他软件(比如搜索工具栏等)。他们中的一些人告诉我,在重新启动计算机后问题会消失一段时间。它并不是一致的,即使在同一台计算机上也没有经验。
All my clients use Windows XP and IE6 and they have popup blockers
turned off; also there is no other software installed (like search
toolbars, etc) that I know of. Some of them told me that after
restarting the computer the problem goes away for a while. It''s not
consistent and it''s not experienced constantly even on the same
computer.




你的工作组(或其他任何东西) is)正在打开XP SP2或更高版本

默认情况下内置弹出窗口阻止程序是ON。

< http://support.microsoft.com /default.aspx?scid=kb;en-us;888021>

检查每台新更新的计算机上的浏览器安全设置。



Your workgroup (or whatever it is) is switching on XP SP2 or greater
where the build-in pop-up blocker is ON by default.
<http://support.microsoft.com/default.aspx?scid=kb;en-us;888021>
Check the browser security settings on each newly updated computer.


感谢您的回复。

这很奇怪。他们正在运行XP SP2,我们走过它们通过

禁用IE内置弹出窗口阻止程序。此外,安全设置是

重置为每台计算机上的默认设置。他们还确认已经关闭了''弹出窗口拦截器'选项。


其次,也许它不是最重要的但是我相信它值得提到

,打开弹出窗口的代码已被重写,以避免自动。弹出开启(即onload事件)只是

绕过阻挡者。所有弹出窗口都显示为

用户点击链接的直接结果。

Thanks for the reply.
This is weird. They are running XP SP2 and we walked them through
disabling the IE builtin popup blocker. Also the security settings were
reset to their default settings on each computer. They have also
confirmed that the ''popup blocker'' option was turned off.

Second, maybe it''s not the most important but I believe it''s worth to
be mentioned, the code that opens up the popup windows has been
rewritten to avoid "automatic" popup opening (i.e. onload event) just
to bypass blockers. All popups are displayed as a direct result of a
user clicking a link.




ldan写道:

ldan wrote:
感谢您的回复。
这很奇怪。他们正在运行XP SP2,我们走过它们通过
禁用IE内置的弹出窗口阻止程序。
Thanks for the reply.
This is weird. They are running XP SP2 and we walked them through
disabling the IE builtin popup blocker.




弹出窗口拦截器是网络中新出现的新东西,所以每个人都试图将它包含在他们的产品中。它变得像一种

反弹出病毒:你可以从最不期望的安装中获得它

:-)

检查所有的防病毒软件(Norton?Pa​​nda?MacAffee?它们现在都是反b上的防爆系统),间谍软件等等。



Popup blockers are a newly new hot stuff in the Net, so everyone is
trying to include it in their product. It''s getting like a kind of an
anti-popup virus: you can get it from the least expected installation
:-)
Check all your antivirus software (Norton? Panda? MacAffee? they are
all coming now with anti-popup), spyware software and so on.


这篇关于IE6上打开弹出窗口的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆