Demiurg
Demiurg

Reputation: 1669

Javascript window.scrollBy not working on particular page

window.scrollBy is not working on the following page http://www.resident.co.il/aspx/places.aspx?t=4&a=1

Any idea what can be the problem ?

Upvotes: 0

Views: 13873

Answers (1)

bobince
bobince

Reputation: 536379

Entering javascript:window.scrollBy(0,10) in the address bar scrolls the window fine for me. I can't see any call to window.scrollBy in the page or attached scripts so I don't know where any failed attempt to scroll might be.

Edit re comment: aahhh, I see. You can only scroll it a little bit, because the document is only ever a little bit taller than the viewport. This is because of the:

position: absolute; width: 100%; height :100%; overflow: auto;

on the wrapper div. You would have to scroll this div, not the window itself, to make the main page of the page move.

I have absolutely no idea why the page is doing this, but then I have no idea why the page is doing a dozen other horrific markup abuses either. Could easily be rewritten to use just a few divs and position: fixed (with JS shim for IE6) instead of the crazy overflow stuff and the five levels of nested tables. (What is this, 1996?)

Upvotes: 2

Related Questions