HTML backspace

C

Cal Lidderdale

I've got a webpage generated by a PHP script. General flow is:

Start page print some stuff and flush();

setup a loop (about 40x)
start an external process output results to file(s)
flush
repeat

setup second loop counting ext procs
sleep 1
echo "There are ## left to do."
repeat until count = 0

process ext files
display results on screen
---------------
Ok, where I'm waiting for the count to go to 0 I would like to display a
counter, ie:
"There are 26 left"
"There are 22 left"
"There are 17 left"
Warm fuzzies for the user that he "will" get an answer ... some day :-D
Only I'd like to just make the number change with out a newline - ^H
doesn't work. printf ("^H^H^H^H%4d", cnt)
Ideas???????????????/

Thanks
 
T

Toby Inkster

Cal said:
Ok, where I'm waiting for the count to go to 0 I would like to display a
counter, ie:
"There are 26 left"
"There are 22 left"
"There are 17 left"
Only I'd like to just make the number change with out a newline - ^H
doesn't work. printf ("^H^H^H^H%4d", cnt)

print "<p>There are <input id=\"foo\"> processes left.</p>";
while ($n = countProcesses())
{
print "<script type=\"text/javascript\">\n;
print "document.getElementById('foo').value = {$n};\n";
print "</script>\n";
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top