I've been trying to get the scrollby javascript feature to scroll
through frames. My end goal is to make my own scroll buttons to use
for navigation through the frame but I figured I would start simple.
I would load a frameset and just move the correct frame by 100 pixels
right and 100 pixels down. Here is the code I am using:
<html>
<script TYPE="text/javascript">
function scrollme()
{parent.frames[1].scrollBy(100,100)}
</script>
<FRAMESET onload="scrollme();" COLS="300,300,300">
<frame src = http://www.yahoo.com name="yahoo">
<frame src = http://www.google.com name="google">
<frame src = http://www.cnn.com name="cnn">
</frameset>
</html>
The line that really matters is of course
{parent.frames[1].scrollBy(100,100)} and I've seen (and tried) this
written many ways. It's got to be a syntax issue. I've tried:
parent.frames.yahoo.scrollBy(100,100)
parent.frames.yahoo.window.scrollBy(100,100)
parent.frames[yahoo].window.scrollBy(100,100)
and more variants. I though maybe the function wasn't running so I
replaced my frames line with alert('Test!') and the msgbox came up.
Any ideas?
Sara