How to implement custom editor submit ,not editor.submit()
How to implement custom editor submit ,not editor.submit()
pig800509
Posts: 12Questions: 2Answers: 0
DataTable Editor,
As title said,
How to implement onsubmit , or click submit button event?
I am using AWS SDK (DynamoDB, API GateWay, Cognito)
I know It's better way that use ajax in editor,
but I don't know how to send ajax request by using those AWS SDK
can you give me a example?
thanks
This discussion has been closed.
Answers
I found a way!!
editor.on( 'preSubmit', function ( e, d ) {
//do somthing
} );
but I still want to know How use ajax send request to get aws dynamodb data and upload image to S3 bucket
If you want to override Editor's default Ajax submission and send your own, you are best to use
ajax
as a function. Then you can manipulate the data and send it wherever you need.Allan
@allan
I am stuck in 'asuccess', after asuccess was called, table won't update, how to implement custom success callback?
ajax: async function ( amethod, url, data, asuccess, aerror ) {
let meth,pat;
@allan or any way to get data(by using $ajax) from AWS DynamoDB with cognito ?
I am using serverless stack and github
Can you just use
$.ajax()
with a URL pointing to your AWS DB? Maybe I'm missing something there.Allan