I got well working form. Inside I have button that submit my form with onclick="form_submit().
THIS CODE SAMPLE WORKS FINE BUT WITHOUT SENDING CONTROL-SUM.
function form_submit(){
$("#add_form").submit();
}
Now I need to send some control-sum with POST on submit form. This control sum is inside other form input so it won't send with this one.
It is necessary to use non AJAX solution. So I tried this way but without success.
function form_submit(){
$("#add_form").submit(function() {
$.post('url.php', $("#control-sum").serialize());
})
}
Could you tell me please, what syntax or method should I use to find the solution?
submit(function(e){ e.preventDefault(); });