I'm trying to connect two sites together, one that uses JavaScript and one that uses PHP. I want to pass a JavaScript variable to the PHP site, and figured the best way to do this would be to use jQuery.
I created a simple PHP page that creates a cookie with it's POST data. One the JavaScript side, I've inserted this code:
I keep getting the error alert and I have no idea how to debug it. I tried:Code:$.post('http://remotedomain/setcookie.php', {ProfileID: ProfileID}, function(){ //successful ajax request }).error(function(){ alert('Error setting cookie'); });
But all that returns is "ERROR". Any thoughts/suggestions?Code:.error(function(jqXHR, textStatus, errorThrown) { alert(textStatus + " | | + errorThrown); });




Reply With Quote