关闭父窗口,没有提示Firefox 2和IE 7 [英] Closing Parent window without prompt for Firefox 2 and IE 7

查看:82
本文介绍了关闭父窗口,没有提示Firefox 2和IE 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道如何在Firefox 2和IE 7中打开弹出窗口并关闭主窗口,而不是

a提示符。任何人对如何操作都有任何想法

。那个。


我目前有这个,它适用于IE 6和Firefox 1.5:


功能windowClose()

{

if(navigator.appName ==" Microsoft Internet Explorer")

{

this.focus(); self .opener = this; self.close();

}

else

{

window.open( '' '' '' _父 '', '' ''); window.close();

}

}


谢谢,

Tony

解决方案

Tony于2007年2月21日下午3:11发表以下内容:


我需要知道如何在Firefox 2和IE 7中打开弹出并关闭主窗口而不需要

a提示。


$ b $你不能。谢天谢地,开发人员听取了用户的意愿,而不是让人们关闭他们没有打开的窗户,所以现在你不能。


-

兰迪

机会有利于准备好的心灵

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

Javascript最佳实践 - < a rel =nofollowhref =http://www.JavascriptToolbox.com/bestpractices/\"target =_ blank> http://www.JavascriptToolbox.com/bestpractices/


荡。好吧,我们让它在IE 6和Firefox 1.5中工作


Tony


<缺少引用>

结算父窗口

< /缺少引用>


dang。好吧,我们让它在IE 6和Firefox 1.5中工作



嗯,你刚刚设法松开了我可能并非轻率的浏览器

历史,特别是我用来查找您网站的谷歌页面。你知道,历史,后退按钮背后的东西。


现在我必须关闭你的新窗口,打开另一个窗口,告诉google我<我br />
正在搜索并尝试导航回到我所在的位置。而且我现在已经开始使用各种谷歌搜索来获取这一点了。他们在历史上如此便利地被破坏了。


请给我你网站的网址,以便我可以将它添加到我的网站列表中/>
永远不会访问。


I need to know how to open a pop up and close the main window without
a prompt in Firefox 2 and IE 7. Anybody have any ideas on how to do
that.

I currently have this and it works in IE 6 and Firefox 1.5:

function windowClose()
{
if(navigator.appName=="Microsoft Internet Explorer")
{
this.focus();self.opener = this;self.close();
}
else
{
window.open('''',''_parent'',''''); window.close();
}
}

Thanks,
Tony

解决方案

Tony said the following on 2/21/2007 3:11 PM:

I need to know how to open a pop up and close the main window without
a prompt in Firefox 2 and IE 7.

You can''t. The developers, thankfully, listened to the wish of users not
to have people closing windows they didn''t open so now you can''t.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


dang. Well we got it to work in IE 6 and Firefox 1.5


Tony

<missing quote>
Closing parent window
</missing quote>

dang. Well we got it to work in IE 6 and Firefox 1.5

Well, you have just managed to loose my probably not inconsiderable browser
history, particularly the google page I had used to find your site. You
know, history, the stuff behind the back button.

Now I have to close your new window, open another window, tell google what I
was searching for and try to navigate back to where I was. And I have now
forgotton the various google searches I used to get to this point. They are
in the history you so conveniently trashed.

Please give me the URL of your site so I can add it to my list of sites
never to visit.


这篇关于关闭父窗口,没有提示Firefox 2和IE 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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