In order to close the progress indicator popup window, it is necessary to call the Window.Close() method on the child window when the transfer has completed. When using the visual upload control, the transfer complete event handler is:
In order for the Window.Close() method to have any effect, it must be called from an object reference to the child window. In order to create this object, declare a global variable and then set it equal to the result of the Window.Open() method. Once you have this reference, call the Close method from within the OnTransferComplete event handler.
Example client-side VBScript code can be found below.
'--- Create global variable that will reference the popup window
'--- Disable the Reset button
document.all("ResetButton").Disabled = True
'--- Here XFile is being initialized when it is loaded
'--- The AXFFile visual control contains an instance of XFRequest which
'--- is the main transfer engine. Set XFRequest property CurrentUrl
'--- That URL is where the upload will be sent to
AXFFile.XFRequest.CurrentUrl = "http://MyServer/MyUploadApplication/uploadprocess.asp"
'--- Files can be added to the AXFFile upload queue by clicking "Add File" in the control
'--- or programmatically by calling the AddFile method
'--- Call the MakeWindow() function when the upload button is clicked
'--- Reset XFile when the reset button is clicked
document.all("UploadBtn").Disabled = False
'--- Once the transfer is complete, the OnTransferComplete event will fire. When this happens,
'--- Call the CloseWindow() function to close the popup window
'--- Create the progress indicator's popup window
Private Function MakeWindow()
If (AXFFile.Count > 0) Then
set oWin = window.open("AXFFileProgress.asp","ProgressIndicator",winstyle)
document.all("UploadBtn").disabled = True
MsgBox "There are no files to upload."
'--- Close the progress indicators popup window
Private Function CloseWindow()