Jump to content

Need scroll help


umekille78

Recommended Posts

Hi all!In a webbpage a have made a iframe. In that iframe i have another webbpage.I use PHP to load text from a file into the webbpage in the iframe. The problem is that the text is larger than the window. That results in a scrollbar in the iframe. No problem so far.The problem Im having is that I want the scrollbar to be in its lowest position on the load of the page. That means that I want the webbpage to show the last part of the text not the first.Is ther any way to do this? Can anyone help me?/Per

Link to comment
Share on other sites

Only way I would know to do that is with anchors (link to a specific place within your page). Basically in your php page in your iframe your place the following code: <a name="linkname"></a>The link that goes to that page should have #linkname added to the end of the link url.Example:

<a href="mypage.htm#linkname">my page</a>

So once the link is clicked the user would be redirected to that specific location within your page.

Link to comment
Share on other sites

Ok. Thats no good.Are you sure theres no other way?Im trying to build a chatroom. And you dont want to have to press a link to get the chat-window to scroll down.One way is too invert the order of the text. So the latest messages is shown att the top. But if there is a way to make the scrollbar to scroll down it would be much nicer.PLEASE try and help med :)/Per

Link to comment
Share on other sites

Well how does it work on your page? When users type your url do they go directly on your chat room page?If not well only the link that goes to that chatroom just add "#achorname" without the quotes.

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...