0
votes

Want to have vertical scroll bar if content is more than expected in popwindow...

I have a snippet to display the popwindow on click of a button which is given below: window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=650,height=500,screenX=150,screenY=150,top=150,left=150,overflow-x:hidden')

with this, i am not able to have th vertical scrollbar if i have the more than expected content in it, How can i get the vertical scroll bar display byitself whenever needed?

2

2 Answers

1
votes

The reason you're not getting a scrollbar, is because you're specifying scrollbars=no in the window options.

window.open(url,
'popupWindow',
'toolbar=no,location=no,directories=no,status=no,menubar=no,**scrollbars=no**,resizable=yes,copyhistory=no,width=650,height=500,screenX=150,screenY=150,top=150,left=150,overflow-x:hidden'
);

Remove the instruction in the opening code, or replace it with scrollbars=yes and it should work as you want it to. For further info, read docs for window.open.

See a demo at http://nikc.kapsi.fi/dev/html/misc/openpopup.html

0
votes

,scrollbars=no must be ,scrollbars=yes

test it here: http://jsfiddle.net/yFRf2/