Hi guys, I wrote jquery code to send values to php file
$('#def_formSubmit').live("click",function(){
var query_string = '';
$("input[@type='checkbox'][@name='assotop']").each(
function()
{
if(this.checked)
{
query_string += "&assotop[]=" + this.value;
}
});
var def_tags = $("#tags").val();
var dataString = 'def_tags='+ def_tags + query_string ;
$.ajax({
type: 'POST',
url: 'post.php',
data: dataString,
cache: false,
beforeSend: function() {
$("#QRresult").html("<img src='images/loading.gif' />");
},
success: function(data5) {
$("#QRresult").html(data5);
}
});
return false;
});
but its not working and not sending checkbox values to php file
I think this way of getting checkbox values is an old approach and does not work for jquery 1.4
source
share