Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

passing data variable using ajax

var myVar = "test";

 $.ajax({
  url: "test.php",
  type: "POST",
  data:{"myData":myVar}
}).done(function(data) {
     console.log(data);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #passing #data #variable #ajax
ADD COMMENT
Topic
Name
3+7 =