Welcome to WebmasterWorld Guest from 54.161.49.216

Forum Moderators: open

Message Too Old, No Replies

popup with vertical scrollbar?

     
5:18 pm on Feb 5, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 6, 2004
posts:19
votes: 0


Is there a way I can make a popup window have only a vertical scrollbar? What I'm trying to do is have text links open a 400x400 window that is a glossary of terms. I'm using anchors to go directly to the particular term, but I also want users to be able to scroll up and down the list. Horizontal scrolling is a no-no.
Thanks.
5:54 pm on Feb 5, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 15, 2004
posts:1300
votes: 0


set the window.open features like this:

"scrollbars=auto,toolbar=no,menubar=no,status=no,width=400,height=400"

As long as your page content is in a fluid container and isn't wider than your popup, you won't get a bottom scroll bar.

6:18 pm on Feb 5, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 6, 2004
posts:19
votes: 0


Thanks for your quick response, isitreal.
I tried what you suggested and it didn't work. It just did the same as before (a 400x400 window with the text wrapped, but no scrollbars). I've included how I used it:

<a href="#" onclick="javascript:window.open('glopopup.html#vector', 'glossary','scrollbars=auto,toolbar=no,menubar=no,status=no,width=400,height=400');">vector digital maps</a>

And how I had it before:

<a href="#" onclick="javascript:window.open('glopopup.html#vector', 'glossary', 'width=400,height=400');">vector digital maps.</a>

Did I do something wrong?

12:21 am on Feb 6, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 15, 2004
posts:1300
votes: 0


I assume what's happening is that the text is disappearing off the bottom edge of the page, is that correct? Popups aren't very smart when it comes to resizing themselves to fit their content, you can try setting scrollbars=yes but that will give you a bottom scroll bar too I think, only Mozilla allows individual control of the x and y scroll bars as far as I know.
12:52 am on Feb 6, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 6, 2004
posts:19
votes: 0


WOOHOO! 'scrollbars=yes' resulted in only a vertical scrollbar. And it works in both Netscape and Explorer.
Thank you, thank you! You made my day!
1:03 am on Feb 6, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 15, 2004
posts:1300
votes: 0


Great, I wasn't sure if that would force the bottom scroll bar too, it will in Opera I think, that's good.

The problem is that popup windows don't know how big their content is, unless it's an image that is sized explicitly if I remember right.