We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

scrollTo() and scrollby()

on
Medium Priority
1,225 Views
window.moveTo and window.resizeTo() work fine in Netscape 4.0, but I can't get subject functions to work.  Please send working example.

Thanks
Dale Means
Comment
Watch Question

View Solution Only

Commented:
scrollTo jumps the window directly to a location from where ever you are.
scrollBy scrolls the window a certain amount. For example,

If your at X: 25, Y: 50
scrollTo(100,100) would take you to X:100, Y:100
scrollBy(100,100) would take you to X:125, Y:150.

Here's an example of scrollTo. The syntax for scrollBy is the same.

<BODY>
<A HREF="javascript:scrollTo(0,1000)">Scroll Down</A>
<BR>q<BR>w<BR>e<BR>r<BR>t<BR>y
<BR>u<BR>i<BR>o<BR>p<BR>a<BR>s
<BR>d<BR>h<BR>j<BR>k<BR>l<BR>z
<BR>x<BR>c<BR>v<BR>b<BR>n<BR>m
<BR>q<BR>w<BR>e<BR>r<BR>t<BR>y
<BR>u<BR>i<BR>o<BR>p<BR>a<BR>s
<BR>d<BR>f<BR>g<BR>h<BR>j<BR>k
<BR>l<BR>z<BR>x<BR>c<BR>v<BR>b
<BR>n<BR>m<BR>q<BR>w<BR>e<BR>r
<BR>t<BR>y<BR>q<BR>w<BR>e<BR>r
<BR>t<BR>y<BR>u<BR>i<BR>o<BR>p
<BR>a<BR>s<BR>d<BR>h<BR>j<BR>k
<BR>l<BR>z<BR>x<BR>c<BR>v<BR>b
<BR>n<BR>m<BR>q<BR>w<BR>e<BR>r
<BR>t<BR>y<BR>u<BR>i<BR>o<BR>p
<BR>a<BR>s<BR>d<BR>f<BR>g<BR>h
<BR>j<BR>k<BR>l<BR>z<BR>x<BR>c
<BR>v<BR>b<BR>n<BR>m<BR>q<BR>w
<BR>e<BR>r<BR>t<BR>y<BR>q<BR>w
<BR>e<BR>r<BR>t<BR>y<BR>u<BR>i
<BR>o<BR>p<BR>a<BR>s<BR>d<BR>h
<BR>j<BR>k<BR>l<BR>z<BR>x<BR>c
<BR>v<BR>b<BR>n<BR>m<BR>q<BR>w
<BR>e<BR>r<BR>t<BR>y<BR>u<BR>i
<BR>o<BR>p<BR>a<BR>s<BR>d<BR>f
<BR>g<BR>h<BR>j<BR>k<BR>l<BR>z
<BR>x<BR>c<BR>v<BR>b<BR>n<BR>m
<BR>q<BR>w<BR>e<BR>r<BR>t<BR>y
</BODY>
</HTML>

Commented:
I know the window will scroll vertically (Y) but I wented an example of how to scroll horizonally (X).  All the examples I have found use 0 for X, as above.  I would very much appreciate an example which will scroll "across" instead of just "up and down".

Many thanks.

Dale means

Commented:
Well, then. The only time that you would need to scroll to the side is when you have a large image. So write a page like this:
If you have a big picture, use it. Otherwise go into paint and make a new picture, something like 2000x2000 or something. Then scribble all over the picture so u can tell when it moves.

<HTML>
<BODY>
<A href="javascript:scrollBy(500,0)">Scroll Right</A>
<IMG SRC="bigimage (a picture bigger than your browser window)">
</BODY>
</HTML>

Not the solution you were looking for? Getting a personalized solution is easy.

Commented:
It works fine.

Thanks
Thanks for using Experts Exchange.

• View three pieces of content (articles, solutions, posts, and videos)
• Ask the experts questions (counted toward content limit)
• Customize your dashboard and profile