Forum Moderators: open
The normal model is that such a call will return a Web page (MIME type text/html) that the client browser will then display.
However, I want the current browser page to remain unchanged. I want to run the server-side script for its side effects, not its standard output.
An example would be attaching a Javascript event to a form button. When the user clicks the button, a "location.href=mycounter.php" statement is executed. mycounter.php would contain PHP code to increment a number stored in a file on the server. The page showing the form doesn't even flicker when the user clicks the button, but the click is counted.
David