I want to make a progress bar for processing some data in server.I don't want to reload page or go to another page. so I used ajax to request process to start!\[code\]$.ajax({ type: "POST", url: "/process.php", dataType: "script", data: "foo=bar", success: function(data){ }});\[/code\]and this request return some code like:\[code\]set_progress(50);\[/code\]over and over in chunked mode.but ajax wait until request is finished and then return response data!so that couldn't be usefull after that I tested another way.I used a iframe for a regular http form.\[code\]<form action="/process.php" method="post" target="iframe" id="formid"> <input type="hidden" name="foo" value="http://stackoverflow.com/questions/12744500/bar" /></form><iframe name="iframe"></iframe>\[/code\]and even this method didn't work (( it will run all javascript codes at the end of request not throw request!I know the regular work to make this work is send user to another page and then send chunked data like:\[code\]<script type="text/javascript">setProgress(percent);</script>\[/code\]but I prefer to not use this way there is any way to make this work?