/    Sign up×
Community /Pin to ProfileBookmark

Sticky buttons need refresh

i have multiple buttons on a page that load documents. the button’s value are set to “Download” until the user clicks on it then it’s changed to “Loading…” once the document loads I need the page to refresh so that the button returns to its original value.

Can i set the page to Refresh after the file is prompt? or can i have the value reset to the original?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@FangMar 02.2007 — AFAIK it is not possible to detect when or if a file has been downloaded completely.
Copy linkTweet thisAlerts:
@woods620authorMar 02.2007 — Oh well, thanks for your help anyway
Copy linkTweet thisAlerts:
@konithomimoMar 02.2007 — If you load the documents into an Iframe then you can use the readyState or onstateChange of the iframe to know when the document it loading, and when it is done. once it is done you can then change the button text back.
×

Success!

Help @woods620 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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