vendredi 28 novembre 2014

Adding js variable to Ajax post data


I am trying to add the variable "val" to an existing list of Ajax data



var val = $(this).val();
$.ajax({
url: 'index.php?route=product/product/add',
type: 'post',
data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select'),


Any ideas if or how this could be done?





Aucun commentaire:

Enregistrer un commentaire