Jump to content

Scroll problems again!


umekille78

Recommended Posts

Hi all!I hope you dont get too borde with me.The other day I got a script from some one here. And I use it in my page.

<script>function scrollit(){window.scroll(0,screen.height);}</SCRIPT>

The script is scrolling down a iframe for me. Every time the iframe is reloaded the script scrolls it to the end.This worked fine and I was happy :) But after a while the text in the iframe was geting long and the script didnt scroll it down to the end any more. It stopped after a while.Is the screen.height a integer value? And so is it becouse the text in the iframe have more rows than that size?The script still scrolls down. But only to a sertan point. Not all the way down.If screen.height is a integer. Can I putt a larger integer in its place to get the efect i want? And if so. What is the biggest integer you can use in a java script?Or can you fix the problem in another way?/Per

Link to comment
Share on other sites

Well noticed :) screen.height gives the screen size ie 1024x768 not document lengthQuick workaround = window.scroll(0,screen.height*100000);I am trying to see if there is a document.height or something.

Edited by scott100
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...