I have several iFrames that load an external webpage, although only 1 appears at a time, hence all have the id="iFrame" I want to add to buttons (not the scrollbar) so the user can scroll down or up by pressing them, and I am trying to do this using javascript but so far I've been unsuccessful, I've read some posts here and tried those answers but so far no luck. I have also tried:
var newFrame = document.getElementsByTagName('iframe');
if(typeof newFrame !== 'undefined'){
newFrame.contentWindow.scrollBy(0,250);
and
var myframe = document.getElementById(window.frameElement[0].id);
myframe.window.scrollBy(0,50);
nothing has worked out so far, could anyone let me know what am I missing or doing wrong? thank you!