Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scrollbars Don't Appear in Popup Window

    Hello,
    I know there have been many posts on many forums regarding this issue but the solutions given don't seem to work for me.
    I have a popup window that contains text that is about five times the window size. My Javascript code, contained within a function is as follows:
    Window4 = window.open("../popups/MusicInfo.html", "littleWindow", "location=no, scrollbars=yes, width=400,height=180, titlebar=no, menubar=no, toolbar=no");
    This code opens the window but the scrollbars are never there in any browser that I've tried.
    When I add: overflow: scroll; to my CSS the scrollbar appears but the scroller (the small box that you drag up and down) is not present.
    Does anyone know what's happening here?
    Thanks,
    TS

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    Try this:-

    window.open("http://example.com", "name", "scrollbars=1,width=400,height=180");

    but note that Firefox will only show scrollbars when the content is larger than the window.

    To force Firefox to always show a scrollbar (like Internet Explorer does) you need this in the stylesheet of the HTML that's being shown in the popup:

    html {overflow: -moz-scrollbars-vertical;}

    It was a day that was thought unthinkable by Bristol Rovers fans. - Commentator BBC1
    Last edited by Philip M; 06-06-2014 at 02:43 PM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for replying Philip.
    "Scrollbars = 1" doesn't work either. Also, the problem is not only with Firefox but with Chrome and IE as well.

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,310
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    Quote Originally Posted by TheSearcher View Post
    Thanks for replying Philip.
    "Scrollbars = 1" doesn't work either. Also, the problem is not only with Firefox but with Chrome and IE as well.
    The code I gave you works fine for me in IE10, and shows scrollbars.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #5
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [spoiler] Works fine for me, so no problem! [/spoiler]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •