-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
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
@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).
Asked: 2016-10-21 21:05:34 +0800
Seen: 32 times
Last updated: Oct 24 '16
How to stop combining commands in an ajax call ?
zk developmet is esay [closed]
Need help with scrolling horizontal tabs in Right-to-Left (Arabic)
Create tab dynamically, multitab application
Radio button value change on database value
How to implement, each user has its own session timeout time