I'm stuck getting the editor to submit to servlet. When I click "save", servlet is invoked. However, I'm not seeing data being passed back.
$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
ajax: "/DB7/SaveScreenDataServlet?theSessionId=E831FAE181D44A7F851A150B284672C36710",
template: '#customEditForm',
idSrc: 'id', //column 0 contains the id field of the screen data table
formOptions: { main: { focus: null } },
table: '#historyTable',
display: onPageDisplay( $('#form-container') ),
fields: [
{label: 'Effective Date', name: 'Effective_Dte', id: 'Effective_Dte', type: 'datetime', format: 'MM/DD/YYYY', opts:{yearRange:100}, attr:{type:'datetime',maxlength:10,placeholder:' / / '} }
{label: 'Job_History_ID', name: 'Job_History_ID', id: 'Job_History_ID', type: 'hidden' }
{label: 'Type', name: 'Job_Type_Code', id: 'Job_Type_Code', type: 'select', options:
{label: "CO : Company", value: "CO : Company"},
{label: "DIV : Division", value: "DIV : Division"},
{label: "LOC : Location", value: "LOC : Location"},
{label: "CLASS : Employment Class", value: "CLASS : Employment Class"},
{label: "EMPCAT : Employment Category", value: "EMPCAT : Employment Category"},
{label: "JOBCAT : Job Category", value: "JOBCAT : Job Category"},
{label: "PLAN : Plan Code", value: "PLAN : Plan Code"},
{label: "UNION : Union Code", value: "UNION : Union Code"}
]}
{label: 'Emp_Employee_ID', name: 'Emp_Employee_ID', id: 'Emp_Employee_ID', type: 'hidden' }
{label: 'Value', name: 'Job_Value_Code', id: 'Job_Value_Code', type: 'select', options:
{label: "A : ABC Company", value: "A : ABC Company"},
{label: "B : BTF Company", value: "B : BTF Company"},
{label: "C : CXW Company", value: "C : CXW Company"},
{label: "D : DYZ Company", value: "D : DYZ Company"},
{label: "E : ESB Company", value: "E : ESB Company"},
{label: "F : F Company", value: "F : F Company"},
]}
{label: 'revision_id', name: 'revision_id', id: 'revision_id', type: 'hidden' }
]} );
I tried changing this line
ajax: "/DB7/SaveScreenDataServlet?theSessionId=E831FAE181D44A7F851A150B284672C36710",
to
ajax: ({
url : "/DB7/SaveScreenDataServlet?theSessionId=E831FAE181D44A7F851A150B284672C36710",
type: "post",
data : form_data
}),
and the screen no longer loads. What am I doing wrong? Thanks!