Submitting ajax form programttically

Hi there,

for some reason, as I try to submit an ajax form programmatically like so

app.dialog.confirm(‘confirmation words’, function () {
self.$$(’.form-ajax-submit’).submit();
});

it opens the action url in an external page but when I just add a proper submit button then it works perfectly well. My only issue is that I would like a confirmation prompt prior to the submission of the form.

I am using the latest version of framework7.

Thank you kindly in advance