You are violating the same origin policy restriction that's built into the browsers. You cannot send cross domain AJAX requests. If you want this to work the ASMX web service must be located on the same domain as the PHP page hosting this javascript code. In this example that would be http://www.w3schools.com/.
If the service you are attempting to consume is located on a remote domain you could write a PHP script on your domain which will consume the remote service (by sending the appropriate HTTP request) and then send an AJAX request to this PHP script instead of directly attempting to call the remote service which is not possible. The new PHP script will simply act as a bridge between your domain and the remote domain where the ASMX service is hosted.
Of course if the remote service supports JSONP or CORS you could consume it directly. That's not the case with ASMX services out-of-the box. Contact the author of the service to see if he supports them.