Results 1 to 7 of 7

Thread: [RESOLVED] Setting cookie on remote host

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Resolved [RESOLVED] Setting cookie on remote host

    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:

    Code:
    $.post('http://remotedomain/setcookie.php', {ProfileID: ProfileID}, function(){
      //successful ajax request
    }).error(function(){
      alert('Error setting cookie');
    });
    I keep getting the error alert and I have no idea how to debug it. I tried:
    Code:
    .error(function(jqXHR, textStatus, errorThrown) {
      alert(textStatus + " | | + errorThrown);
    });
    But all that returns is "ERROR". Any thoughts/suggestions?
    Last edited by Datacide; Nov 14th, 2012 at 07:25 AM.
    PHP in your FACE!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width