Greetings!
n00b javascript programmer here. What I’ve got going on is a form with a reset button — tied to HTML forms, if you press the escape key, it activates the reset button on a form and subsequently clears the data out of it. I want to prevent this on first press (e.g. necessitating that if someone ‘accidenty’ presses the ESC key on their keyboard, they don’t also ‘accidently’ lose all the data in the form).
Is there something that I can code in that will sort of ‘verify’ that they indeed want to clear the form via a pop up Yes/No alert box — and pending they click No, it retains the data in the form?
Any help would be greatly appreciated!
Thanks,
– SAM