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("i frmDisplay");
amountToScroll = window.document .body.scrollTop - prevScroll;
document.getEle mentById("pnlCo ntrolsContainer ").style.to p =
parseInt(docume nt.getElementBy Id("pnlControls Container").sty le.top) +
parseInt(amount ToScroll);
document.getEle mentById("imgSh opLogo").style. top =
;//parseInt(docume nt.getElementBy Id("imgShopLogo ").style.to p) +
parseInt(amount ToScroll);
prevScroll = window.document .body.scrollTop ;
}
now from the code, the panel's id is pnlControlsCont ainer, 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.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!