How to raise “completed” event on a submit event?

后端 未结 2 407
南旧
南旧 2021-01-25 10:52

The controller action is called after the completedCallback not after $(this).submit(). See the code below. How can i trigger the action before raising the completed callback wi

2条回答
  •  故里飘歌
    2021-01-25 11:19

    If you do not want to use ajax, you cannot reliably call something after the submit - the form's processing is done. You must use ajax if you want a response.

    If you want to call your function BEFORE your form submit - again.. you MUST use some form of ajax.

    See How do I capture response of form.submit

    If you really need control of events like this - you need ajax or iframe hacks. Sorry : )

提交回复
热议问题