0

Show busy indicator while uploading file

asked 2016-10-21 21:05:34 +0800

jvilcayp gravatar image jvilcayp
3 1

Hello,

I have a form where a file is uploaded to the server, and It is required that while the file is loading the page is blocked with an overlay, i'd like to know how to achive this, i haven't seen that option in the docs and I've looked to the source code for uploading files (guess it's this one: //github.com/zkoss/zk/blob/884e074c3ab999798dcf38b01564ec1f4c940818/zul/src/archive/web/js/zul/Upload.js#L380) and as far as i can see in it, on line 380 it just launches the upload and queries the server for when it is finished. Is there any way to achive this?

Thanks in advance

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-10-22 05:15:05 +0800

Darksu gravatar image Darksu
1991 1 4

Hello vilcayp,

You can use Clients.showBusy in order to accomplish your task as shown below:

http://zkfiddle.org/sample/co3jpm/2-show-busy-at-client-while-do-something

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2016-10-24 22:12:40 +0800

jvilcayp gravatar image jvilcayp
3 1

@Darksu, Actually not, i do not want to show the busy indicator when the page is loading, but when it uploads a file. Here (//zkfiddle.org/sample/17oh8i5/2-basic-upload-button) you can see that it works when a file is uploaded, but if the user cancels the file chooser prompt, the busyIndicator does not go (since there is no event attached).

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2016-10-21 21:05:34 +0800

Seen: 32 times

Last updated: Oct 24 '16

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More