I have a question,I'd like to send data using method post using ajax call,so I do like that:
jQuery.noConflict();
jQuery(document).ready(function () {
$("input#submit").click(function(){
$.ajax({
type: "POST",
url: "ajax?uid="+<?php echo $sf_user->getGuardUser()->getId() ?>+"fid="+<?php echo $user->getId() ?>+"fn="+<?php echo $user->getfirstName() ?> +"ln="+<?php echo $user->getlastName() ?>, //
data: $('form.contact').serialize(),
success: function(msg){
$("#thanks").html(msg)
$("#form-content").modal('hide');
},
error: function(){
alert("Something is wrong!");
}
});
});
});
</script>
But It seems not working for me, i get this strange error :
ReferenceError: Jean is not defined url: "ajax?uid="+1+"fid="+13+"fn="+Jean +"ln="+paul, //
Very strange because when I remove fn and ln
and I keep just the number value it works very well?