Here is my JS code:
function info(){
$.ajax({
type:'POST',
url:'doSomething.php',
data:'text='+encodeURIComponent($('.text').html())
+'&info1='+encodeURIComponent($('.info1').html())
+'&info2='+encodeURIComponent($('.info2').html())
+'&info3='+encodeURIComponent($('.info3').html())
+'&var1='+$('#var1').val()
+'&var2='+$('#var2').val()
+'&var3='+$('#var3').val(),
success:function(){$('.action').fadeIn(500).delay(1000).fadeOut(500)}
});
//alert("info - did something, great!");
return false;
};
Everything works and is passed to doSomething.php script; except for:
var1 var2 var3
can any one please tell me why? Is there a problem with above JS, or my PHP:
I'm new to AJAX. - thanks for helping!