in the event onValidate: sc_ajax_javascript('prova'); then i wrote a javascript function (javascript method) called prova: var rowCount = $('table >tbody >tr').length; var rowCount1 = $(this).find('tbody > tr').length; var appo = new Array (); var valori_ins = new Array (); var appot /*giro per contare quante t ci sono*/ for (var i = 1; i <= rowCount; i++) { pippo="id_ac_sottocat_"+i; //t=t+1; if (document.getElementById(pippo) != null) { d=document.getElementById(pippo); if (d.hasAttribute("value")) { appo[i] = document.getElementById(pippo).value; //alert(i); //alert(appo[i]); if((appo[i] == "undefined")||(appo[i] == null)||(appo[i] == "")||(appo[i] == " "))break; } } else {break;} } $.ajax({ // method: 'post', // tipo di richiesta HTTP type: "POST", //async: false, url : "http://127.0.0.1:8081/scriptcase/app/prendonota/blank/blank.php",//percorsoalloscriptlato server data: "categoria= "+appo[i-1] , // parametro opzionale, per impostare la query string //dataType : 'script', // parametro opzionale, formato dei dati (xml, json, script, o html) success: function (r) { // istruzioni richiamate al termine della richiesta t=i-1; } }); /********************************* end of prova ****************************************************/ in the event onAfterinsert i wrote: sc_redir("http://127.0.0.1:8081/scriptcase/app/prendonota/prova_autocomplete/index.php"); to refresh the page where you work. It isn't nice but i can't find something better. At last you have to create a page blank with php script to update your database (i called it blank.php). (the name of my table is pro_sottocat with key id_sottocat) In the event onExecute of blank.php i wrote: $st= [categoria]; $idute = [id_ute]; $sql1="SELECT max(id_sottocat) FROM pro_sottocat"; sc_lookup(ds1, $sql1); $stc={ds1[0][0]}; /** * Update a record on another table */ // SQL statement parameters $update_table = 'pro_sottocat'; // Table name $update_where = "id_sottocat = '".$stc."' and id_nome = ".$idute.""; // Where clause $update_fields = array( // Field list, add as many as needed "sottocat = '".trim($st)."'" ); // Update record $update_sql = 'UPDATE ' . $update_table . ' SET ' . implode(', ', $update_fields) . ' WHERE ' . $update_where; sc_exec_sql($update_sql); echo "
".$st."
";