I have this function which is supposed to open up a child window using Javascript. I’m doing it this way:
if (a == "culture") {
newWindow = window.open('criteria.php?type=culture','','scrollbars=yes,width=400,height=300');
newWindow.focus();
}
else if (a == "service") {
newWindow = window.open('criteria.php?type=service','','scrollbars=yes,width=400,height=300');
newWindow.focus();
}
However, the scrollbars never appear – and I can’t figure out why. I’ve been asked to include them, as my windows don’t work well without them (they’re obviously a small size, and with dynamic content, this size can quickly get expanded on)
How do I fix the scroll issue? Why does scrollbars=yes not work?
On some browsers scrollbars are only shown when the content is too long for the height.
If your current content does not exceed
300px, then they will not be shown.The default for
scrollbarsisyesanyway, so you don’t need to specify this parameter.