here is a code that when the page loads the i frame will scroll up and down
can some one PLZ help me out i just need 2 functions one to scroll up/down w/ text buttons “javascript:scrollIframeDOWN()” “javascript:scrollIframeUP()”
it doesn’t even have to scroll just when you click on the button it will go up/down 20pix if that’s easier
thanks
[CODE]<HTML>
<HEAD>
<TITLE>
iframe scrolling
</TITLE>
<SCRIPT>
var step = 20;
var tid;
var oldPageYOffset;
function scrollIframe () {
if (window.anIframe && window.anIframe.scrollBy) {
var ifr = window.anIframe;
ifr.oldPageYOffset = ifr.pageYOffset;
ifr.scrollBy(0, step);
if (window.opera) {
if (ifr.pageYOffset == ifr.oldPageYOffset)
step = -step;
}
else if (document.all) {
if (ifr.document.body.scrollTop <= 0 ||
ifr.document.body.scrollHeight – ifr.document.body.scrollTop
<= ifr. document.body.offsetHeight)
step = -step;
}
else
if (document.getElementById) {
if (ifr.pageYOffset <= 0 ||
ifr.document.height – ifr.pageYOffset <= ifr.innerHeight)
step = -step;
}
}
}
</SCRIPT>
</HEAD>
<BODY ONLOAD=”tid = setInterval(‘scrollIframe()’, 100)”>
<IFRAME NAME=”anIframe” WIDTH=”780″ HEIGHT=”100″
SRC=”whatever.html”></IFRAME>
</BODY>
</HTML>
Thanks for your help