I know it's possible using jQuery to load/run an external web page. In the past I've used something like:
$.ajax({ url : 'test.php'})
What's I'm looking to do now is when a user click the 'GO' button an external PHP is called. Whilst it's running the main page should show 'please wait' and once the external script has finished the main page should update to show completed.
The php page I'm calling is actually running a shell script and I get no feedback from it. However the page runs and completes fine.
Is there anyway I can tell if it's still running and then update the main page ?
I'd be grateful if some one could point me in the right direction.
Thanks
UPDATE based on answer below.
<script type="text/javascript">
$(document).ready(function() {
$("#update").click(function() {
$("#status").html("<p>Please Wait!</p>");
$.ajax({ url : 'test.php' }).done(function() { $("#status").html("Completed"); });
});
});
</script>
<span id="status"><span>
<input type="button" id="update" value="Check for Update" />