JavaScript Window.Open location feature not working - Stack Overflow

In my window.open I've set the location to no.As I understand it, this should open a popup windo

In my window.open I've set the location to no. As I understand it, this should open a popup window with no address bar. However, when the popup window appears it has an address bar in all browsers except for Safari. How can I open a new window without an address bar?

<script type="text/javascript" language="javascript">
$(document).ready(function() {

    var win = window.open("<%= Uri %>", "_blank", "directories=no,location=no,menubar=no,titlebar=no,toolbar=no,status=no");
    if (win != undefined) {
        window.location.href = '<%= this.Request.UrlReferrer.AbsoluteUri %>';
    }
});

In my window.open I've set the location to no. As I understand it, this should open a popup window with no address bar. However, when the popup window appears it has an address bar in all browsers except for Safari. How can I open a new window without an address bar?

<script type="text/javascript" language="javascript">
$(document).ready(function() {

    var win = window.open("<%= Uri %>", "_blank", "directories=no,location=no,menubar=no,titlebar=no,toolbar=no,status=no");
    if (win != undefined) {
        window.location.href = '<%= this.Request.UrlReferrer.AbsoluteUri %>';
    }
});

Share Improve this question asked Aug 25, 2010 at 21:49 Aaron SalazarAaron Salazar 4,53710 gold badges43 silver badges55 bronze badges 2
  • Many browsers don't let you disable some features due to security reasons – Rafael Commented Aug 25, 2010 at 21:53
  • newer browsers don't let you do evil things like that. – DA. Commented Aug 25, 2010 at 22:06
Add a ment  | 

1 Answer 1

Reset to default 4

In general, you can never guarantee that the user won't see window features you ask to be hidden, because some browsers (Firefox, I know, and maybe others) allow the browser user to control what features can be disabled. On top of that, some plugins add toolbars and don't pay any attention to those parameters to window.open.

That said, that parameter usually works, as I've successfully used it, and it works in cooperating browsers (including all versions of IE I've tried).

edit — I just tried a quick test and it seems to work just fine in Chrome and IE. Now, Chrome shows a little indicator area at the window top that shows the URL, but it's not really the plete "location" bar.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745221768a4617279.html

相关推荐

  • JavaScript Window.Open location feature not working - Stack Overflow

    In my window.open I've set the location to no.As I understand it, this should open a popup windo

    6小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信