Skip to content Skip to sidebar Skip to footer

How To Use 'window.open' To Create With Scrollbar In Firefox?

How do I use 'window.open' to create a new window with scrollbars in firefox? thanks!

Solution 1:

This should do it:

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

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;
}

Solution 2:

via http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

example

The following code opens a window with menu bar. The window is resizable and is having 350 >pixels width and 250 pixels height.

window.open ("http://www.javascript-coder.com",
"mywindow","menubar=1,resizable=1,width=350,height=250"); 

another example

A window with location bar, status bar, scroll bar and of size 100 X 100

window.open ("http://www.javascript-coder.com",
"mywindow","location=1,status=1,scrollbars=1,
width=100,height=100"); 

Post a Comment for "How To Use 'window.open' To Create With Scrollbar In Firefox?"