jquery - sendform and some data -
i need send server form data , array. i'm trying next:
var array= [3,4,5,1,2] var form = $(this); var url = $(this).attr("action"); , $.post(url, {form: form, array:array})
but it's not sending.
or can this:
var array= [3,4,5,1,2]; data={ form:$(this).serialize(), array:array }; $.ajax({ url:$(this).attr("action"); type:'post', datatype: 'json', contenttype: "application/json; charset=utf-8", data: data, success:function(data){ //success process }, error:function(data){ //error process }, });
Comments
Post a Comment