Skip to content
Advertisement

Submit button not consistently firing

I have an asp.net core razor form with a submit button. When the user clicks ‘Update’, the form calls a JavaScript function to prompt the user if they are sure they want to complete the request. This functionality has been working, but starting last week, the form will occasionally not save despite the user confirming that they want to complete the request.

JavaScript

The user always gets prompted if they want to complete the request and sometimes the post goes through and other times it acts as though the user said no to the prompt (even though they did not). Do you have any suggestions on how to troubleshoot/correct this issue?

Advertisement

Answer

If you want to submit the form when retVal is true,try to use the following code

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement