I have found many questions related to an ajax call by method with jQuery but I still haven't found the exact answer.
I have a button to which the call function is linked:
<button type="submit" class="btn btn-outline-success submit_btn_up" onclick="UpRecord(this)" id="submit_btn_up">Memorizza</button>
function UpRecord(OggettoID) {
var ws_method = 'update';
var id = OggettoID.value;
var nomepacchetto = $('#nomepacchetto').find('input[name="nomepacchetto"]').val();
var numerominuti = $('#numerominuti').find('input[name="numerominuti"]').val();
var importocanone = $('#importocanone').find('input[name="importocanone"]').val();
$.ajax({
url: pacchetti_wsurl + 'ws_json_gestionepacchetti800',
type: 'GET',
data: {
method: 'GestioneMetodo_U',
ws_login: readCookie("wc_login").replace(/\"/g, ""),
ws_password_type: 'C',
ws_pwd: encodeURI(readCookie("wc_password").replace(/\"/g, "")),
nomepacchetto: nomepacchetto,
tipotraffico: $("#locality-dropdown option:selected").val(),
numerominuti: numerominuti,
importocanone: importocanone,
id,
ws_method
},
dataType: "json",
encode: true,
}).done(function(data) {
/*window.location.replace('./wbc_gestionepacchetti800.html');*/
});
event.preventDefault();
};
While this is the first module principle, just a test to see if it works, can anyone help me?
int GestioneMetodo_U(int livello, char *fz_errorcode, char *fz_httperror, char *fz_database, char *fz_login, char *fz_strkey, char *fz_sort, char *fz_offset, char *fz_limit, json_object *j_array_fz_metodo)
{
pk_dbquery("insert","insert into elena_webservice_log set webservice='wbc_gestionepacchetti800',query_string=''TEST");
}