dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: wait message needs during graphic rendering

  1. #1
    Join Date
    Jul 2006
    Posts
    2

    wait message needs during graphic rendering

    Dear All,

    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:

    http://hanalei.ucsc.edu/cgi-bin/hour_plot11.pl

    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?

    thanks much,

    eli

  2. #2
    Join Date
    Jul 2006
    Location
    Nebraska
    Posts
    380
    I'm not sure if it would help, but you could try making a div, then hiding when the processing is done.
    HTML Code:
    <div id="waitDiv" style="width: 200px; height: 100px; margin: auto;">Please Wait, Plot Rendering</div>
    .
    .The Render Code
    .
    <script type="text/javascript">
    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";
    </script>
    That ought to do it (maybe). You also prob. need to make the output handle hot, $| , I think.
    Last edited by PineSolPirate; 07-19-2006 at 11:34 AM. Reason: Code

  3. #3
    Join Date
    Jul 2006
    Posts
    2

    please clarify?

    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."

    thanks again,

    eli

  4. #4
    Join Date
    Jul 2006
    Location
    Nebraska
    Posts
    380
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles