I am trying to use onsubmit javascript event with my php code.
So I have a screen in which I am allowing a user to select a record to delete,when the user presses the submit button. But I want the user confirm his action when he presses the submit button by displaying a popup by using javascript
I have added onsubmit event like this
<input type="submit" value="Submit" onsubmit="confirm('Are you sure you wish to delete this record?')" />
But no pop up or alert message is displayed.