submitting a form inside a modalbox with jquery
- by birdy
submitting form with jQuery
works
         $('#testform').submit();
doesn't work
              $('#testform').submit(function () {
                 alert('test1');
                return true;
              });
This is just an exmaple but at times i'd like to do stuff before submission of the form. Like for example submit the form using $.POST
Update:
If I keep both then the $.POST has no value because the form still gets submitted the traditional way, without ajax...
                    $("#testform").submit(function() {
                            $.post('/myajaxcontroller', function(data) {
                                $('#result').html(data);
                            });
                    });
                    $("#testform").submit();