sync2007 Posted February 15, 2007 Share Posted February 15, 2007 Hello everybody... I'm asking if there is a way in PHP to alert a message box containing (Yes and No) when a user clicks on an html submit button that performs a deleting operation, and cancels the operation if he chooses (No) otherwise if he chooses (Yes) it performs the operation? Quote Link to comment Share on other sites More sharing options...
ozfred Posted February 15, 2007 Share Posted February 15, 2007 Hello everybody... I'm asking if there is a way in PHP to alert a message box containing (Yes and No) when a user clicks on an html submit button that performs a deleting operation, and cancels the operation if he chooses (No) otherwise if he chooses (Yes) it performs the operation? You need something like this in your form: <form ... onsubmit="return confirmSubmit();" ... > And the confirmSubmit function is: function confirmSubmit(){ return confirm('Do you really want to submit the form?'); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.