javascript on iPhone

Can I just grouse for a minute?

The following javascript will scroll the window contents by one screen’s height:

onClick=”window.scrollBy(0,window.innerHeight?window.innerHeight:document.body.clientHeight);”

But it doesn’t work on iPhone. Argh.

onClick=”window.scrollBy(0,170);”

That scrolls a Safari 3.0 beta window 170 pixels. But it doesn’t work on iPhone’s mobileSafari browser.

onClick=”window.scrollBy(0,window.innerHeight);”

That works on Safari 3.0 beta, too — but it jumps all the way to the bottom of the window on the iPhone. It seems like something’s broken, or not implemented fully, in the iPhone’s browser.

Or so it seems; I’m totally new to javascript, and this is just what I’ve been able to pull from other folks examples and developer.mozilla.org javascript documentation. Maybe it’s me?

ok