This is a ajax widget of yii2 which will generate a div. The tags (except form) click or forms submission (for those tags and forms with data-ajax attribute) in this div will trigger an ajax request.
To trigger the Ajax widget, you can use a submit button or a jquery submit() function. But cannot use the pure javascript submit() function to trigger it.
You can use:
<button type="submit">Submit</button> (In your form)