Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

importing a file 1

Status
Not open for further replies.

jags22

Programmer
Oct 17, 2001
44
US
I have an intranet application that goes to a form after the logon page. On the form, is a button that the user can select to download a file. This file is very big and it works fine but if the user trys to do anything while the download is taking place it blows up. I have put a download message box in the functionality while the download is taking place. The problem is that when the download is complete the msgbox remains on the screen. Is there a way to pass the object so the msgbox knows when the download is complete? Or is there a function that I can use that I can pass the parameters so it knows when the download is complete?
If any one has had this problem and has found a good solution, please let me know and I will be in your gratitude. Or if there is a better way to solve, I am all ears. Thanks a head of time.
 
If you're using javascript to pop up the message box, the window open() method returns the object ID of the window it opened. So, presuming you have a process that's watching the download to know when it's done, you only need to close the window with that ID.

The trick is this "process that's watching the download to know when it's done". Since a web page is inherently stateless... it's not something that a web page or javascript will be able to do very easily.


What if you used FTP instead of HTTP to transfer the file? I'd bet that timing out would be less of an issue. Or maybe even emailing the file, instead of trying to transfer it via the website. You're not really clear how big "very big" is (big is a very relative term)... so it's hard to say if email would work. But if it IS "very big", you really should be transfering via FTP anyway.

-Carl
 
Thanks for your reply and suggestion. I got it going using javascript and a gif but am still not satisfied. I am going to try your idea with ftp (emailing is not an option). Will the ftp function create a msg box while the ftp is occurring? Any other bits of wisdom would be appreciated. Been working in WebSphere for the last 2 years but one of our clients asked for this on the ColdFusion box. So, I am picking it up as I go. Thanks again.
 
In most cases FTP will put up a progress dialog. It kind of depends on what FTP client the user might have installed. By default (with no other FTP client installed), it's just a standard little dialog from the browser. If you happen to have WS_FTP or some other FTP client, or something like GoZilla downloader... then you'll see whatever dialog they put up.

But the nice thing is, it's whatever the user is accustomed to for FTP downloads... it's not something unique that you designed from the server side.

-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top