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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -