/    Sign up×
Community /Pin to ProfileBookmark

iframe refresh: automatically scroll back bottom

Hi,

I have an iframe that contains x.asp:

[CODE]<iframe name=chat width=90% height=50% frameborder=0 src=x.asp></iframe>[/CODE]

x.asp is refreshed every 1 second using metatag. The problem is that everytime x refreshes, x goes top so the last line is not visible.

What I need is a javascript that when x refreshes, scroller automatically goes to the last line.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@WolfShadeDec 20.2010 — Simple route would be to put a named anchor at the bottom of x.asp and include the name in the URL (x.asp#thisName) so the refresh scrolls to it every time.

OR, you could format x.asp so that the data is contained within a DIV, give the DIV an ID, and use obj.scrollIntoView(false); (false tells it to scroll so that the bottom of the object is flush with the bottom of the browser window - true would make the top of the object flush with the top of the browser window.)

^_^
×

Success!

Help @radujit 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.28,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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