?
Solved

Display page as it is loading

Posted on 2003-02-20
3
Medium Priority
?
139 Views
Last Modified: 2013-12-25
I have a script that copies files from one server to another.  I want to display the status of these copies "as they are happening" ....
like
Copy of File ABC started..
Copy of file ABC completed successfully

Copy of File DEF started
Copy in progress......

my script will not write the page to the screen as it is loading ...only after all files are completed and I write the </html> tag.

how do I get around this ...and write the screen as it is happening..
0
Comment
Question by:Durell
1 Comment
 
LVL 2

Accepted Solution

by:
BassTeQ earned 200 total points
ID: 7991784
This is probably a bit messy but it should work.
What Id do is put all the filenames I want to transfer into an array.

Then loop through the array one file at a time, once you've got the filename, use javascript to add a paramater to the end of your script script.cgi?file=file1.zip and reload it with this new paramater.

Then when your script reloads it picks up that file contains a variable called file1.zip, so then execute the code to do then, then refresh the page and change the file name to script.cgi?file=file2.zip and so on.

This way you wont have to wait for all the files to transfer until you see results on the page.

Sorry I cant provide a code example, bit busy at the moment, but hopefully my explaination will help you out.

Cheers
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question