umekille78 Posted March 13, 2006 Share Posted March 13, 2006 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 More sharing options...
vchris Posted March 13, 2006 Share Posted March 13, 2006 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 More sharing options...
umekille78 Posted March 13, 2006 Author Share Posted March 13, 2006 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 More sharing options...
scott100 Posted March 13, 2006 Share Posted March 13, 2006 I answered a similar question the other day, you can use javascript to obtain the browser height and then scroll to bottom of page, hopefully this helps:http://w3schools.invisionzone.com/index.ph...indpost&p=14238 Link to comment Share on other sites More sharing options...
vchris Posted March 13, 2006 Share Posted March 13, 2006 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 More sharing options...
umekille78 Posted March 13, 2006 Author Share Posted March 13, 2006 THANKS Scott!You totaly saved the day! /Per Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now