I\'m trying to make my first ajax example working on my MAMP. my ajax.html looks like:
Your problem is that you're trying to do a cross domain request. The browser prevents it due to same origin policy.
The standard solution is to set CORS headers in your PHP to allow those requests.
For example :