Datatable view searching functionality

I want to be able to use “onkeypress” when typing in a filter box to ajax post a string to my data loading script e.g. “SC” or “1234” . I want to apply the following logic to the following line {id:“Ref_No”, header:[“Ref No”, {content:“serverFilter”}], sort:“server”, width:130}. At the moment it is not working as expected - Any ideas?