/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] auto scrolling

ok this is the last repost i will do here
i am making a text adventure game and i need the output text box to scroll to the bottom every time new content is added

my text adventure so far
[url]http://www.red566.nf/GuiTest/testlayout.html[/url]
only works with firefox and chrome
the game ends after the first battle but more coming soon

if no one can help could you pleas at least tell me where else i could get help with this

thanks again

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Logic_AliJul 13.2013 — [CODE]element.scrollTop = element.scrollHeight;[/CODE]
Copy linkTweet thisAlerts:
@red566authorJul 13.2013 — could you give me an example of where i would put that pleas

thanks
Copy linkTweet thisAlerts:
@red566authorJul 13.2013 — ok cool so this works ?

function AutoScroll(){

TextOutput = document.getElementById("div id")

TextOutput.scrollTop = TextOutput.scrollHeight

}

why is it always the seemingly small things that take for ever to find
×

Success!

Help @red566 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...