How to call PHP proxy script from JQuery
- by recipriversexclusion
I'm trying to get cross-domain Ajax to work. I downloaded a PHP proxy script from the Yahoo Developer site, ran it from command line and verified that it receives the XML from the server with a GET request.
Now, I'm trying to connect to the PHP script within JS with no results. I have the following:
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript">
$.ajax({
type:"GET",
url:"proxy.php",
dataType:"html",
success:function(msg){
alert(msg);
}
});
</script>
What this does, though, is to output the source of the PHP script in the alert box, not the XML! Where am I going wrong?