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
1 Answer
Reset to default 4In 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
评论列表(0条)