Hello,
I am trying to hide the scrollbars on my site. For all browsers except ie7 and ie6, this works:
function hidescrollbars() {
document.body.setStyle({ position:"fixed" });
document.body.setStyle({ overflow:"hidden" });
}
function showscrollbars() {
document.body.setStyle({ position:"" });
document.body.setStyle({ overflow:"visible" });
}
I did manage to hide the scrollbars with ie7 by adding an attribute scroll = no to the body tag like this:
<body scroll="no">
The problem is that i can not input this inside my javascript function. I have tried:
document.body.scroll = no;
document.(body ID).scroll = no;
prototype:
document.body.writeAttribute('scroll', 'no');
How can I add and remove this scroll = no attribute inside my body tag without giving the body tag an id?
I am trying to hide the scrollbars on my site. For all browsers except ie7 and ie6, this works:
function hidescrollbars() {
document.body.setStyle({ position:"fixed" });
document.body.setStyle({ overflow:"hidden" });
}
function showscrollbars() {
document.body.setStyle({ position:"" });
document.body.setStyle({ overflow:"visible" });
}
I did manage to hide the scrollbars with ie7 by adding an attribute scroll = no to the body tag like this:
<body scroll="no">
The problem is that i can not input this inside my javascript function. I have tried:
document.body.scroll = no;
document.(body ID).scroll = no;
prototype:
document.body.writeAttribute('scroll', 'no');
How can I add and remove this scroll = no attribute inside my body tag without giving the body tag an id?