submit name of modified field
submit name of modified field

I have an editor table with some editable fields. The submission is made to the modification of one of the editable fields.
At submit I want to send all the data plus the name of the modified field.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @gaspare.licari ,
Is this with
inline()
editing? If so, the default is to only send the changed value to the server. To send them all, use thesubmit
form-options, something like this:Cheers,
Colin
my code is
Ho change it?
Hi @gaspare.licari ,
You should add it to the line where you're calling
inline()
, as in my example above. Where do you call that in your code?Cheers,
Colin
<%@ Language=VBScript %>
<!--#INCLUDE FILE=../Include/NoCache.asp-->
<!--#INCLUDE FILE=../DET/include/srvFunctions.asp-->
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<html>
<head>
<title></title>
<style type="text/css" class="init">
</style>
<link href="../Class/DataTables/DataTables-1.10.11/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="../Class/Editor-1.5.6/css/editor.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="../Class/DataTables/Select-1.1.2/css/select.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="../Class/DataTables/Buttons-1.1.2/css/buttons.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="../Class/DataTables/KeyTable-2.1.1/css/keyTable.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="../Class/DataTables/FixedColumns-3.2.2/css/fixedColumns.dataTables.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../CSS/Lista.css">
<script src="../Class/jquery-1.12.2.min.js" type="text/javascript"></script>
<script src="../Class/DataTables/datatables.min.js" type="text/javascript"></script>
<script src="../Class/Editor-1.5.6/js/dataTables.editor.min.js" type="text/javascript"></script>
<script src="../Class/DataTables/Buttons-1.1.2/js/dataTables.buttons.min.js" type="text/javascript"></script>
<script src="../Class/DataTables/Select-1.1.2/js/dataTables.select.min.js" type="text/javascript"></script>
<script src="../Class/DataTables/KeyTable-2.1.1/js/dataTables.keyTable.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../Class/DataTables/FixedColumns-3.2.2/js/dataTables.fixedColumns.min.js"></script>
</head>
<body class="dt-example">
<div class="container">
<table id="compensi" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th width="10%">Cod.Dip.</th>
<th width="10%">Tipo Compenso</th>
<th>Action</th>
<th width="2%"><%=GiornoDellaSettimana("01/" & MESE & "/" & ANNO, 2)%></th>
<th width="2%"><%=GiornoDellaSettimana("02/" & MESE & "/" & ANNO, 2)%></th>
<th>RowId</th>
<th>IdCompensi_Tot</th>
</tr>
</thead>
</table>
</div>
</body>
</html>
<%
Function GiornoDellaSettimana(Data, Lunghezza)
GiornoDellaSettimana = Day(cdate(Data)) & "</br>" & Left(WeekdayName(Weekday(cdate(Data))), cint(Lunghezza))
End Function
%>
I can't see in that code where you're calling the
inline()
function. That would be the place to add it, as I showed in my example above.I do not call explicitly inline (), it is defined in
My post data is as image
From this Json i don't understand which field is changed! (D1..D30)
I still have to submit all the fields
You are using
keys.editor
which will do theinline()
call for you.Editor doesn't have an API option that will let you do exactly what you are looking for I'm afraid - it will either give you the data that was changed, or all of the data, and doesn't provide information about which was the field that was changed.
That said, it is possible to get that information using the
displayed()
. You could then usepreSubmit
to send to the server what field(s) were shown:Then use
edited
at the server-side to tell what was edited.The will work for user interaction, but it is technically possibly to use the API to mess with that - trigger inline editing on a specific cell, and then use the API to edit the value of a different cell!
Allan