Submit action getting hit twice while using JQuery UI Dialog

后端 未结 3 704
花落未央
花落未央 2021-01-15 08:01

I am writing an ASP.NET MVC 4 application using JQuery and bootstrap.

There is a modal dialog functionality in my site which used to work smoothly until recently whe

3条回答
  •  没有蜡笔的小新
    2021-01-15 08:36

    It sounds like you may be submitting the form once from your script, and then again due to the browser's default behavior. Try adding this to the top of your handler:

    event.preventDefault();
    

提交回复
热议问题