solution for window.open scrollbars=no not working in chrome

Published on Author Code Father

I have a link that opens a popup window using window.open(). The problem is the scrollbars=no don’t work in Chrome. They work in IE and Firefox, so I’m thinking it has something to do with Chromes new scroll bars. This is  the code I’m using:

html:

<a href="http://mypage.com/mypage.html">Mypage</a>

jQuery:
$('a').click(function() {
    window.open("http://mypage.com/mypage.html", "", "width=300,height=300,scrollbars=no");
});
Solution:
just put overflow:hidden; in body tag in mypage

Example: mypage.html

<!DOCTYPE html>
<html>
<body style=”overflow:hidden;“>

<p>This is a paragraph.</p><p>This is a paragraph.</p>

<p>This is a paragraph.</p>

</body>
</html>


Comments

comments