03-30-2019, 02:00 AM
First you must decide if you are going to call this using AJAX or not. The approach is different.
If you are not using ajax, you just need to create 2 hidden input fields in your form (or even 1 and parse it at server side) which will receive the parameters.
Then your JS function add() should actually set the value of those hidden inputs and submit the form. IW server will receive all declared hidden input values as parameters of the request.
On the other hand, AJAX (Async) is much easier. You just need to call one of the JS Ajax functions and pass the parameters as strings.
If you are not using ajax, you just need to create 2 hidden input fields in your form (or even 1 and parse it at server side) which will receive the parameters.
Then your JS function add() should actually set the value of those hidden inputs and submit the form. IW server will receive all declared hidden input values as parameters of the request.
On the other hand, AJAX (Async) is much easier. You just need to call one of the JS Ajax functions and pass the parameters as strings.