PDA

View Full Version : Javascript function won't carry through in new frame


bacterozoid
11-29-2002, 09:51 PM
Site is here: http://www.geocities.com/jon_zie/index.htm

There are three frames, tp,mn, and bt; being the top, main, and bottom frames. In the top frame there are two arrows. When you hover over either one of them the main frame should scroll the corresponding direction. I don't know what the problem is. I have tested the scroll script in a page all it's own (http://www.geocities.com/jon_zie/scroll.htm) and it works just fine. Did I mess up the dot syntax targeting for the scroll commands? Maybe the preloading and image onMouseover changes effect the scrolling...I'm not sure. I shall keep trying, but help is appreciated.

Mr J
11-30-2002, 02:19 PM
In functions scrolldown() and scrollup() change the lines

parent.mn.location.scrollBy(0,5)

To

parent.mn.scrollBy(0,5)

And in the onmouseover and onmouseout events move the function call to the beginning.

From



<A onmouseover="imageOn('up'); return setMsg('Scroll Up'); scrollup()" onmouseout="imageOff('up'); return setMsg(''); upstop()" target=mn href="http://www.geocities.com/jon_zie/tp.htm#">


To



<A onmouseover="scrollup();imageOn('up'); return setMsg('Scroll Up') " onmouseout="upstop();imageOff('up'); return setMsg(''); " target=mn href="http://www.geocities.com/jon_zie/tp.htm#">

bacterozoid
11-30-2002, 03:02 PM
Well, I'll have to thank you, it works great! :) Such simple mistakes, too. Thanks a bunch!