Hello,
I would like to scroll the content of an IFRAME sideways instead of up and down.
The up and down version I figured out, but how can i adjust the existing script to make it scroll from left to right and vice versa untill it reaches the end of the div or table?
and then the button script:Code:<script type="text/javascript"> var timer_id; function scroll_iframe(frm,inc,dir) { if (timer_id) clearTimeout(timer_id); if (window.frames[frm]) { if (dir == "v") window.frames[frm].scrollBy(0, inc); else window.frames[frm].scrollBy(inc, 0); timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20); } } function stopScroll() { if (timer_id) clearTimeout(timer_id); } </script>
andCode:<a href="javascript:;" onmouseover="scroll_iframe('scr1', -4, 'v'); window.status='Up.'; return true" onmouseout="stopScroll(); window.status=''; return true">
Thanks!Code:<a href="javascript:;" onmouseover="scroll_iframe('scr1', 4, 'v'); window.status='Down.'; return true" onmouseout="stopScroll(); window.status=''; return true">



Reply With Quote

Bookmarks