Results 1 to 1 of 1

Thread: AJAX form passing viables through send()

  1. #1
    Join Date
    May 2010
    Location
    Sacramento, CA
    Posts
    91
    Thanks
    23
    Thanked 2 Times in 2 Posts

    Default AJAX form passing viables through send()

    HELP!

    My ajax form works but it doesn't...

    Code:
    var testVariable="testVar=test";	
    	
    xmlhttp.open("POST","new_msg_save.php",true);
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
    xmlhttp.send(testVariable);
    ^ does not work... but

    Code:
    xmlhttp.open("POST","new_msg_save.php",true);
    xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
    xmlhttp.send("testVar=test");
    ^ DOES work... what am i missing?
    Last edited by crobinson42; 04-08-2012 at 10:44 PM.

Bookmarks

Posting Permissions

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