[TriLUG] Screen movement in JS

Brian McCullough bdmc at bdmcc-us.com
Wed Sep 1 17:45:26 EDT 2010


Folks,

Here's a slightly different one for the gurus in the group.

I have project that I am working on, and sometimes the users get dropped into a page part way down the screen.  Sometimes that happens to be on completely blank territory, but in any case, they really don't know what to do.

I would like to be able to programatically scroll the screen to the top as they enter when this happens.

I have been doing a lot of reading, both on paper and on screen, and trying various examples.

window.scroll( x, y ) doesn't seem to do anything, and neither does window.scrollTo( x, y ).

I have also created buttons that issue those commands, but nothing ( except firing the breakpoint in Firebug ) happens when I click on them.


Any bright ideas?


Thanks,
Brian





More information about the TriLUG mailing list