wait message needs during graphic rendering
I have a page where I need to generate a png graphic on the fly before the page is complete. Currently I use the qx command to call a java program at the top of the perl script. qx returns after the png is rendered and the page can finish being created for the user.
To make this clearer, here is the web page:
The problem with this is that the png graphic needs about 10 seconds to render and during that time nothing is happening. I would like it if there was some sort of "Please wait while the plot is being drawn" kind of message while the plot is being rendered. I can't figure out how in the world to do such a thing. Can anyone think of anything?
I'm not sure if it would help, but you could try making a div, then hiding when the processing is done.
That ought to do it (maybe). You also prob. need to make the output handle hot, $| , I think.
<div id="waitDiv" style="width: 200px; height: 100px; margin: auto;">Please Wait, Plot Rendering</div>
.The Render Code
var waitDiv = document.getElementById('waitDiv');
waitDiv.style.width = "0px";
waitDiv.style.height = "0px";
waitDiv.style.visibility = "hidden";
waitDiv.style.position = "absolute";
waitDiv.style.top = "0px";
Last edited by PineSolPirate; 07-19-2006 at 11:34 AM.
Hi. Thanks for replying. I'm sorry, I don't understand what you mean here:
"You also prob. need to make the output handle hot, $| , I think."
Sorry, was going from memory. If you have problems with buffering in Perl, you can make a handle "hot" with "$| = 1;" Anyway, I figured since you were doing heavy processing in the background, you would want to get the "wait" message out of the buffer as soon as it hit the print statement. Check out http://perl.plover.com/FAQs/Buffering.html
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)