Connecting Tech Pros Worldwide Forums | Help | Site Map

File Upload Status

Newbie
 
Join Date: Jan 2007
Posts: 2
#1: Jan 22 '07
I've written a PERL program that allows a user to upload a file, but it waits until the file has been completely loaded before it displays that it is complete. I have determined the size, and can print out the status (ie. 4096 bytes at 3%), but it doesn't display it until the file has completely loaded.

Is there anyway (I'm sure there is) to open a Javascript window that updates each increment of the process?

Expert
 
Join Date: Oct 2006
Location: NC
Posts: 1,722
#2: Jan 22 '07

re: File Upload Status


Quote:

Originally Posted by dfrew

I've written a PERL program that allows a user to upload a file, but it waits until the file has been completely loaded before it displays that it is complete. I have determined the size, and can print out the status (ie. 4096 bytes at 3%), but it doesn't display it until the file has completely loaded.

Is there anyway (I'm sure there is) to open a Javascript window that updates each increment of the process?

You want to open a new window? Wouldn't that open a ton of windows? While the file is uploading why don't you display Please Wait... or something?

Aric
Newbie
 
Join Date: Jan 2007
Posts: 2
#3: Jan 22 '07

re: File Upload Status


Quote:

Originally Posted by AricC

You want to open a new window? Wouldn't that open a ton of windows? While the file is uploading why don't you display Please Wait... or something?

Aric

I need something to let the user know that the upload is proceeding. If I just put up a message, it could be stopped and the user would still only see the message. If it popped up a new window, I was thinking of having the window display a progress bar that was being updated, and then it would close itself when it was done.
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#4: Jan 22 '07

re: File Upload Status


Here is a Perl script that may be what you need.
Samji's Avatar
Newbie
 
Join Date: Dec 2006
Posts: 23
#5: Jan 24 '07

re: File Upload Status


Quote:

Originally Posted by AricC

You want to open a new window? Wouldn't that open a ton of windows? While the file is uploading why don't you display Please Wait... or something?

Aric

I think dfrew means, the text in the same window would be updated every percentage increment.

E.g. "25% done" then "26% done" in the same window.

I don't know very much about perl, but if you can access it via JavaScript, you could print out to a new window with the document.write() method.
Reply


Similar JavaScript / Ajax / DHTML bytes