[thelist] javascript help
Rita Crisafi
rita at crisafidesign.com
Mon Dec 20 10:11:55 CST 2004
http://www.andreasbrickoven.com/test/menu.html
I had all kinds of crazy specs from this client and i know that the images
are large (didn't design it). The client wanted menu stuff to scroll on the
page, so I found a simple javascript that scrolls content in an iframe for
this page.
><script type="text/javascript">
>/*************************************************************************
> This code is from Dynamic Web Coding at http://www.dyn-web.com/
> See Terms of Use at http://www.dyn-web.com/bus/terms.html
> regarding conditions under which you may use this code.
> This notice must be retained in the code as is!
>*************************************************************************/
>
>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>
What i didn't realize at the time, is that it only works in IE and not
firefox or netscape. Does anyone know of why and if there is any kind of
modification i can make so that it will work in other browsers?
More information about the thelist
mailing list