how to return continuus output?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oliver Spiesshofer

    #1

    how to return continuus output?

    Hi,

    I have a script which takes some time to execute.
    I would like to return intermediary results during the execution.

    what would be the best thing to do?

    So far there are no results until all the functions have finished the
    processes.

    thanks

    Oliver

  • Guest's Avatar

    #2
    Re: how to return continuus output?

    > I have a script which takes some time to execute.[color=blue]
    > I would like to return intermediary results during the execution.[/color]

    You can play around with flushing output, however, there is no guarantee
    there. The most elegant solution is to do the following:

    1 - Before you start the processing, output a javascript based popup window
    (or you can use a div layer instead). This will serve as your "please
    wait..." dialog.

    2 - Once the script is done processing (most likely at the end of your html
    output), output the cooresponding javascript to close the popup window or
    hide the div layer.

    _______________ _______________ ______
    Wil Moore III, MCP | Integrations Specialist


    Comment

    • Blackie

      #3
      Re: how to return continuus output?

      this is only human-seen solution...
      ....but if processing takes more time, browser interrupts connection, after
      timeout
      to prevent this timeout, you need to send some data (and flushing it) in
      time between this two steps

      if you cannot execute PHP code in this time-consuming operation (ie. you
      wait for processing big SQL query) "register_tick_ function" may be useful
      also you can use style="display: none", to hide this text from human reader

      Blackie


      <laidbak69@hotm ail.com> pí¹e v diskusním pøíspìvku
      news:10ep8ebfer viace@corp.supe rnews.com...[color=blue][color=green]
      > > I have a script which takes some time to execute.
      > > I would like to return intermediary results during the execution.[/color]
      >
      > You can play around with flushing output, however, there is no guarantee
      > there. The most elegant solution is to do the following:
      >
      > 1 - Before you start the processing, output a javascript based popup[/color]
      window[color=blue]
      > (or you can use a div layer instead). This will serve as your "please
      > wait..." dialog.
      >
      > 2 - Once the script is done processing (most likely at the end of your[/color]
      html[color=blue]
      > output), output the cooresponding javascript to close the popup window or
      > hide the div layer.
      >
      > _______________ _______________ ______
      > Wil Moore III, MCP | Integrations Specialist
      >
      >[/color]


      Comment

      Working...