if (document.all && y < ps.document.body.scrollHeight || document.height && y < ps.document.height) {
ps.scroll(0,y);
y = y + 4;
when = setTimeout('movedown()',1);
}
}
which worked ok but need to change it so that i can pass the name of the frame to be scrolled for a general script. so i changed it to the following...
function movedown(ps) {
if (document.all && y < parent.frames[ps].document.body.scrollHeight || document.height && y < parent.frames[ps].document.height) {
parent.frames[ps].scroll(0,y);
y = y + 4;
when = setTimeout('movedown()',1);
}
}
this seems to do something when i pass movedown('left') but refuses to loop the script. any ideas anyone??
it needs to be written as above because setTimeout expects its first parameter to be a string. If you wrote it as:
when = setTimeout('movedown(ps)',1);
the assumption would be that ps is also a value and not a variable.
pas tres bien!
so as i understand it should be like so....
function movedown(frame) {
if (document.all && y < parent[frame].document.body.scrollHeight || document.height && y < parent[frame].document.height) {
parent[frame].scroll(0,y);
y = y + 4;
when = setTimeout('movedown(' + frame + ')',1);
}
}
this does'nt work it moves 4 pixels on calling the function and never anymore, does'nt loop!!
Bookmarks