Using window.scrollTo

Hi Everybody

I'm looking to create some short storyline courses that will be viewable by some employees on mobile devices.  I have set the course size to resize to fit the browser screen.  I have inserted some javascript (window.scrollTo(0, 1)) and added margin-bottom:100px; to the html of the course so that it will hide the url address bar on mobile devices.  I am hoping to ensure the course fills up the entire screen of the phone and hides the url address bar....

Does anybody see any problems with this??? or an easier way?

Thanks for everything:)  Hope everybody is having a great day!

Don Needs

1 Reply
onEnterFrame (James Kingsley)

You may want to read up on the viewport meta tag. This is Apple's info on it but it applies (mostly) to other devices as well. 

http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html

You can also use apple-mobile-web-app-capable  but that is iOS spefic. 

http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html

Lastly you might be able to use the HTML5 Fullscreen API but you will run into some (solvable) issues getting it to work in all browsers. 

http://www.sitepoint.com/html5-full-screen-api/