最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Scrollbars not appearing in new window - Stack Overflow

programmeradmin4浏览0评论

I'm trying to open a new window, and for some reason the scrollbars will not appear in Firefox or IE, but do work fine in Chrome & Opera.

here's the javascript code on the button (from a PHP script), and below, if it's more readable, the HTML that is output:

window.open('".BASE_URL."utils/viewProfile.php?key=".$key."',null,'width=1280,height=1024,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=1,resizable=1')"

<input class="input-button btn_generic_nav6up" type="button" onclick="window.open('.php?key=8UjKKydCyTx1V7E2A0xklA%3D%3D',null,'width=1280,height=1024,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=1,resizable=1')" value="view profile" />

I'm trying to open a new window, and for some reason the scrollbars will not appear in Firefox or IE, but do work fine in Chrome & Opera.

here's the javascript code on the button (from a PHP script), and below, if it's more readable, the HTML that is output:

window.open('".BASE_URL."utils/viewProfile.php?key=".$key."',null,'width=1280,height=1024,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=1,resizable=1')"

<input class="input-button btn_generic_nav6up" type="button" onclick="window.open('https://domain./utils/viewProfile.php?key=8UjKKydCyTx1V7E2A0xklA%3D%3D',null,'width=1280,height=1024,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbar=1,resizable=1')" value="view profile" />
Share Improve this question edited Sep 28, 2009 at 16:45 GSto asked Sep 28, 2009 at 15:08 GStoGSto 42.4k37 gold badges135 silver badges188 bronze badges 2
  • it works in IE but does not work in IE? – slf Commented Sep 28, 2009 at 15:10
  • oops. that was a typo. Thanks for pointing it out, I've corrected it now. – GSto Commented Sep 28, 2009 at 16:45
Add a ment  | 

2 Answers 2

Reset to default 11

Off the top of my head, I think it's scrollbars (plural) and not scrollbar.

Also I thought it was scrollbars=yes rather than scrollbars=1, but it's possible either will work.

in the window, add this to the stylesheet:

html, body{
  overflow: scroll;
}
发布评论

评论列表(0)

  1. 暂无评论