P
Paul Fi
when i scroll up and down a page i want the panel inside to move as well
so that it doesnt disppear when scrolling the page:
now i have this javascript code, that does that, but it's not so smooth:
prevScroll = 0;
function scroll(){
var displayFrame = document.all("ifrmDisplay");
amountToScroll = window.document.body.scrollTop - prevScroll;
document.getElementById("pnlControlsContainer").style.top =
parseInt(document.getElementById("pnlControlsContainer").style.top) +
parseInt(amountToScroll);
document.getElementById("imgShopLogo").style.top =
;//parseInt(document.getElementById("imgShopLogo").style.top) +
parseInt(amountToScroll);
prevScroll = window.document.body.scrollTop;
}
now from the code, the panel's id is pnlControlsContainer, and im
changing the top attribute of the panel so i can make that panel move
with page scroll when the eventhandler (scroll()) is called. But it
doesnt produce smooth results as the top of the panel looks stammer or
it keeps bouncing up and down like when im scrolling the page.
if you guys know of a smoother result, i will appreciate it.
so that it doesnt disppear when scrolling the page:
now i have this javascript code, that does that, but it's not so smooth:
prevScroll = 0;
function scroll(){
var displayFrame = document.all("ifrmDisplay");
amountToScroll = window.document.body.scrollTop - prevScroll;
document.getElementById("pnlControlsContainer").style.top =
parseInt(document.getElementById("pnlControlsContainer").style.top) +
parseInt(amountToScroll);
document.getElementById("imgShopLogo").style.top =
;//parseInt(document.getElementById("imgShopLogo").style.top) +
parseInt(amountToScroll);
prevScroll = window.document.body.scrollTop;
}
now from the code, the panel's id is pnlControlsContainer, and im
changing the top attribute of the panel so i can make that panel move
with page scroll when the eventhandler (scroll()) is called. But it
doesnt produce smooth results as the top of the panel looks stammer or
it keeps bouncing up and down like when im scrolling the page.
if you guys know of a smoother result, i will appreciate it.