How to use event.preventDefault() when function have arguments
i have a code like this:
i have a code like this:
I have here a datatable with a form inside that has 3 submit buttons. I did a switch statement which it checks what submit button was clicked, then performs the operation of that submit button on my store()
function. Currently, I’m trying to submit the form using ajax. If I remove the switch
statement, and just return one operation/function.e.g. saveCredit()
, then it saves data in the database. However, with switch
statement, in place, it doesn’t save any data.