Open shyjuvs opened 5 years ago
@shyjuvs you need to send your data in Json format I guess, something like this;
{ "userEmailAddress" : "test@test.com"}
@ismcagdas When we use jTable, there is no option that we can specify the data. It is submitted internally. As I mentioned, if I directly post using ajax and specify the data after JSON.stringify, it works.
Integration with legacy systems always puts the burden on the new integration. JTable used the add record dialog which it serializes and sends via POST to the server. It expects a suitable structure JSON object reply. If you need to change either or both of these interfaces you need to write it yourself. Rather than just supply a URL for the addAction, supply your own deferred function see documentaion This function can gather the necessary information, JSON.stringify it, send it via ajax to your legacy system, and translate the result back to JSON object suitable for jTable.
I am using jtable with ASP.NET MVC. jtable version is 2.3.0. MVC is 4.0. When try to add a new record, I get the error " Invalid JSON primitive". When I try directly using ajax post and send the data using JSON.stringify(), this works. Any idea what is the issue?