Window.close和Explorer 7问题! [英] Window.close and Explorer 7 problem!

查看:76
本文介绍了Window.close和Explorer 7问题!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿大家:)


我们有一个严重的问题,我可以看到其他人也已经运行了



在Internet Explorer 7中,不再可以执行window.close

打开一个窗口后,

没有收到一条警告消息询问你是否想要关闭窗口。

这不会发生在Internet Explorer 6,Mozilla firefox或其他

浏览器中。


这是代码:


< SCRIPT type =" text / javascript">


WindowName ="" ;;

var left,top;

left =(window.screen.availWidth - 400)/ 2;

top =(window.screen.availheight - 250) / 2;

settings =

" toolbar = no,location = no,directories = no," +

" status =不,menubar = no,scrollbars = no," +

" resizable = no,top =" + top +",left =" + left +" ;, height = 250 ,width = 400" ;;


window.open(''登录。 asp?p = ja&<%= Request.Querystring%>'',WindowName,settings);


window.opener = self;

window.close();


< / SCRIPT>

我已经搜索了几天这个问题并找到了以下内容。

http://www.codeproject.com/useritems...__new_try_ .asp


有谁可以让这个例子在IE 7决赛中工作?


有谁知道解决这个问题的另一种方法hack的问题;)...?

在firefox中有一个名为user.js的配置文件,你可以设置

" allow_scripts_to_close_windows"。在IE 7中是否有这样的文件或

资源管理器?


我们需要使用window.open删除工具栏,如上所述。 />
没有收到此警告消息..


如果你可以帮助解决这个问题,我会称你为世界上最好的程序员;)


Sincerly

Jan

Hey everyone:)

We have a critical problem, which I can see that other people also has ran
into.
In Internet Explorer 7 it is no longer possible to do a window.close after
opening a window,
without getting a alert message that ask if u want to close the window.
This did NOT happen in Internet Explorer 6, Mozilla firefox or other
browsers.

Here is the code:

<SCRIPT type="text/javascript">

WindowName="";
var left, top;
left = (window.screen.availWidth - 400)/2;
top = (window.screen.availheight - 250)/2;
settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=no,"+
"resizable=no, top="+top+", left="+left+", height=250,width=400";

window.open(''login.asp?p=ja&<%=Request.Querystring %>'',WindowName,settings);

window.opener=self;
window.close();

</SCRIPT>
I have searched for days about this problem and have found the following.

http://www.codeproject.com/useritems...__new_try_.asp

Can anyone get this example to work in IE 7 final?

Does anyone know another way to solve this problem with a hack;)...?
In firefox there is a config file called user.js, where u can set
"allow_scripts_to_close_windows". Is there a file like this in IE 7 or
explorer?

We need to remove the toolbar, like above, with the window.open,
without getting this alert message..

if u can help solve this, i would call u the best programmer in the world;)

sincerly
Jan


推荐答案

Jan Tovgaard说以下在2006年11月20日上午9:45:
Jan Tovgaard said the following on 11/20/2006 9:45 AM:

嘿大家:)


我们有一个严重的问题,我可以看到其他人也跑进了

Hey everyone:)

We have a critical problem, which I can see that other people also has ran
into.



关键问题?

"critical problem"?


在Internet Explorer 7中,不再可以执行window.close之后

打开一个窗口,
In Internet Explorer 7 it is no longer possible to do a window.close after
opening a window,



当然可以。

Sure it is.


没有收到询问您是否要关闭窗口的警报消息。
without getting a alert message that ask if u want to close the window.



是的我可以。

Yes I can.


这不会发生在Internet Explorer 6,Mozilla firefox或其他

浏览器。
This did NOT happen in Internet Explorer 6, Mozilla firefox or other
browsers.



我不确定我是否相信这个说法。

I am not sure I believe that claim.


这是代码:


< SCRIPT type =" text / javascript">


WindowName ="" ;;

var left ,顶部;

left =(window.screen.availWidth - 400)/ 2;

top =(window.screen.availheight - 250)/ 2;

settings =

" toolbar = no,location = no,directories = no," +

" status = no,menubar = no, scrollbars = no," +

" resizable = no,top =" + top +",left =" + left +",height = 250,width = 400" ;;


window.open(''login.asp?p = ja&<%= Request.Querystring%>'',WindowName,settings);
Here is the code:

<SCRIPT type="text/javascript">

WindowName="";
var left, top;
left = (window.screen.availWidth - 400)/2;
top = (window.screen.availheight - 250)/2;
settings=
"toolbar=no,location=no,directories=no,"+
"status=no,menubar=no,scrollbars=no,"+
"resizable=no, top="+top+", left="+left+", height=250,width=400";

window.open(''login.asp?p=ja&<%=Request.Querystring %>'',WindowName,settings);



window.open('''',''_ parent'','''');

window.close() ;

window.open('''',''_parent'','''');
window.close();


window.opener = self;

window.close();


< ; / SCRIPT>


我已经搜索了几天这个问题并找到了以下内容。

http://www.codeproject.com/useritems...__new_try_.asp



这是一个VB解决方案,点击一个按钮。

That''s a VB solution with a button to click.


有谁能让这个例子在IE 7最终版中工作?
Can anyone get this example to work in IE 7 final?



当IE7 Final出来时可能。至于现在,我可以。

When IE7 Final comes out maybe. As for now, yes I can.


有没有人知道用黑客解决这个问题的另一种方法;)......?
Does anyone know another way to solve this problem with a hack;)...?



是。

Yes.


在firefox中有一个名为user.js的配置文件,你可以在其中设置

" allow_scripts_to_close_windows"。在IE 7或

资源管理器中是否有这样的文件?
In firefox there is a config file called user.js, where u can set
"allow_scripts_to_close_windows". Is there a file like this in IE 7 or
explorer?



No.

No.


我们需要使用window.open删除工具栏,如上所示,

没有收到此提示消息..
We need to remove the toolbar, like above, with the window.open,
without getting this alert message..



不,你不需要需要到,你想想要至。巨大的差异。

Nah, you don''t "need" to, you "want" to. Huge difference.


如果你可以帮助解决这个问题,我会称你为世界上最好的程序员;)
if u can help solve this, i would call u the best programmer in the world;)



不要称我为世界上最好的程序员,称我为世界上最好的JS

黑客,可以正常拼写。


-

兰迪

机会有利于准备好的心灵

comp.lang.javascript常见问题 - http://jibbering.com/faq

Javascript最佳实践 - http://www.JavascriptToolbox.com/bestpractices/


Jan,


这可能有助于查看脚本所在的上下文。它看起来像

也许IE认为你试图关闭唯一的打开窗口,并且据我所知,它不会让你在没有警告的情况下做到这一点(在任何

版本中) n)。


如果您有一个示例链接,我可以更好地确定

问题。

Jan,

It may help to see the context that the script is in. It looks like
maybe IE thinks you are trying to close the only open window, and as
far as I know, it won''t let you do that without a warning (in any
version).

If you have a link to an example I may be able to better determine the
problem.


spamgrabs在2006年11月20日下午4:25发表以下内容:
spamgrabs said the following on 11/20/2006 4:25 PM:

Jan,


可能有助于查看脚本所在的上下文。
Jan,

It may help to see the context that the script is in.



不,它不会。

No it won''t.


看起来好像IE认为你正在试图关闭唯一开放的

窗口,据我所知,如果没有一个<它就不会让你这么做br />
警告(任何版本)。
It looks like maybe IE thinks you are trying to close the only open
window, and as far as I know, it won''t let you do that without a
warning (in any version).



如果它是唯一打开的窗口,则没有区别。或标签。这是无关紧要的。
无关紧要。并且,是的,我可以在没有提示的情况下关闭IE(任何IE4 +版本)。


-

Randy

Chance Favors准备好的心灵

comp.lang.javascript常见问题 - http:// jibbering。 com / faq

Javascript最佳实践 - http: //www.JavascriptToolbox.com/bestpractices/


这篇关于Window.close和Explorer 7问题!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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