$.ajax({ url: 'buildquery.php',
data: {action: 'test'},
type: 'post',
success: function(output) {
alert(output);
}
});
<?php
echo "Hello World!";
die();
?>
In this particular case I would like the PHP script to halt so I can see the output in my browser window and not return into the .ajax function. This would be for debugging purposes so I can output some data so my user can see the output while the application is under construction. Can this be done? Alternatives? I though about using the submit function of the form but this is going to cause some code changes between debug and release builds. Thanks for any commentary!
I would suggest just writing it to a file in the php script. Or use firebug. Or chrome developer tools. (Click network and select XHR)