When I make an ajax call (see code below), what is \"data\". How do I set and get data
// $.post()
$(\"#post\").click(function(){
$(\"#result\").h
For example, I use:
$(document).ready(function(){
$("#btSend").click(function() {
$.post("/Ajax/script.php", {nome: $("#nome").val(), email: $("#email").val()}, function(data) {
alert(data);
});
return false;
});
});
The script.php return what I want to show, but you can change to make another operation with 'data'. The 'btSend' is a image and the 'nome' and 'email' is html textboxes.
This works :)