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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to Display Message During Processing

Status
Not open for further replies.

jordanpope

Programmer
Sep 23, 2003
21
BR
Hi.

I'm looking for a script (Java or other) to display a message that basically says to expect some delays during processing before displaying the final output.

I have a php application with a mysql backend - the application is dynamic and in some cases takes considerable time (1-2 minutes) between user selection and output.

I would like to display this message without using a popup or a new window - I just want it to display on the same page that as the output - i.e., the output will replace the message as soon as it is available ...

any ideas?
 
yes try this:
<?
echo &quot;Otuputting...&quot;;
flush();
//do ur long php work here...
?>

Known is handfull, Unknown is worldfull
 
This is a start, but I don't want the text to remain once the output is ready ....

Any ideas?
 
that u have to manage using JS,

try this:
Code:
<?
echo &quot;<div name='outp' align='center'>Otuputting...</div>&quot;;
flush();
//do ur long php work here...
?> 
//All ur HTML
</html>
<script>
document.getElementsByName(&quot;outp&quot;).innerText=&quot;&quot;
</script>

now does it work?

Known is handfull, Unknown is worldfull
 
\u000A is the Unicode escape for newline.

and \u000a is interpreted as newline when parsed by the compiler

so

// char c1='\u000a';

became

// char c1='
';

which cause compilation error.

if you comment out as

/* char c1='\u000a'; */

then it will be ok.
 
guessed that...

Known is handfull, Unknown is worldfull
 
This doesn't seem to have the effect I'm looking for ... doesn't output now until all php processing is completed, and still remains at the top of the screen ... any further ideas?
 
ah, duplicate thread, i dont get ur it, it will output &quot;Outputting&quot;, try removing the script...

Known is handfull, Unknown is worldfull
 
it outputs: &quot;Outputting...&quot; at the top of the page ... I tried removing the script and still doesn't output until everything is output. I currently have it placed as the first item below the initial <HTML> tag...
 
is it before ur heavy PHP code? try removing the DIV tags, i want u to achieve atleast printing (removing it we can work out later)...

Known is handfull, Unknown is worldfull
 
echo &quot;outputting...&quot;;
flush();

makes the text appear immediately ... but it remains ...
 
i have answered in PHP forum...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top