Is it possible to have an HTML form POST command that does not reload the current page?
I'm writing an SPA using Angular.JS and PHP, and the PHP code creates a PDF file that I want the server to spool to a local printer OR send to the client (depending on the client being a PC or a mobile device), so I believe I need a POST to download the PDF file, but in some cases I don't need the file download, hence I want the server to send a 'do nothing' response to the browser.
I can work around by using an AJAX request first, and depending on the response perform a POST, but was wondering if it was possible to minimise server communication.
Thanks