EasyUI Forum

General Category => General Discussion => Topic started by: azizkhani on January 02, 2015, 08:10:45 AM



Title: how to send form input in json not in form submit
Post by: azizkhani on January 02, 2015, 08:10:45 AM
i have a form and send data by json and ajax but when i use easy ui form data send by application/form not application/json
and server raise exception how can id do it ?
plz help me


Title: Re: how to send form input in json not in form submit
Post by: stworthy on January 02, 2015, 08:41:16 AM
To submit a form, just call the 'submit' method of form.
Code:
$('#ff').form('submit',{
  url:...,
  success:function(result){
    console.log(result);
  }
});


Title: Re: how to send form input in json not in form submit
Post by: azizkhani on January 04, 2015, 07:39:34 AM
To submit a form, just call the 'submit' method of form.
Code:
$('#ff').form('submit',{
  url:...,
  success:function(result){
    console.log(result);
  }
});




i want to chage this parameter

type : 'DELETE',
dataType : 'json',
contentType : 'application/json; charset=utf-8'


how can do it?