Welcome Guest, Not a member yet? Register   Sign In
flushing content inside DIV
#1

[eluser]cellulit[/eluser]
hi guys;

i'm trying to achieve a fairly simple thing and either i coded something wrong or my approach is skewed. i'm calling a controller to be executed inside a div, via ajax function. the controller is supposed to throw a few messages, let's say every 5 seconds (in reality, after some actions are completed).

so my controller is:
Code:
function test()
{
    echo 'strat-';ob_flush();flush();
    sleep(5);
    echo 'sleep-';ob_flush();flush();
    sleep(5);
    echo 'stop';ob_flush();flush();    
}
everything is perfect if i run it as a separate page. start -> 5 sec -> sleep -> 5 sec -> stop
but if i call it inside a div, using ajax->link_to_remote; i can only see the final state, after 10 secs. nothing in the middle.

thank in advance for tips. i run out of ideas.
best;
cll


Messages In This Thread
flushing content inside DIV - by El Forum - 10-06-2009, 01:42 AM
flushing content inside DIV - by El Forum - 10-06-2009, 02:24 AM
flushing content inside DIV - by El Forum - 10-06-2009, 03:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB