In that case, you don't have to worry about scripting on the main page, you can script it all within the iframe src itself. All that is, is scrolling the page up and down using document.body.scrollTop. I suggest using a completely different script in that case.
page_scroller.htm
Code:
<html>
<head>
<script language="javascript">
var i=0
var speed=3
function scrollUp() {
i=i-speed
var newDoc = document.getElementById("body")
newDoc.scrollTop=i
if (i < 0) {i=0}
t1=setTimeout("scrollUp()",0)
}
function scrollDown() {
i=i+speed
var newDoc = document.getElementById("body")
newDoc.scrollTop=i
if (i > window.screenTop) {i=window.screenTop}
t2=setTimeout("scrollDown()",0)
}
</script>
<style type="text/css">
body {
margin:0px;
overflow:hidden
}
#msg {
position:absolute;
text-align:center;
font:20px arial;
top:0%;
right:10%
}
#body {
height:100%;
width:100%;
overflow:hidden;
padding:15px
}
</style>
</head>
<body>
<div id="msg">
<a href="#" onmouseover="scrollUp()" onmouseout="clearTimeout(t1)"><img src="up.bmp" border="0"></a>
<br><a href="#" onmouseover="scrollDown()" onmouseout="clearTimeout(t2)"><img src="down.bmp" border="0"></a>
</div>
<div id="body">
The body of your document
<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test
<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test
</div>
</body>
</html>
scroller_index.htm
Code:
<html>
<head>
</head>
<body>
<iframe src="page_scroller.htm" width="300" height="300"></iframe>
</body>
</html>
the images are attached
Bookmarks