- don't forget the
return
: it'sonsubmit="return someFunction()"
notonsubmit="someFunction()"
- if you are relying on an external javascript file to provide
someFunction()
, the function mustn't be wrapped in anything else. this means, no$(document).ready()
or the like. as a result, the external script needs to go just before the closing</body>
tag rather than in the<head>
in order for everything to load in the right order.
Created
February 4, 2015 11:25
-
-
Save d-baker/37fd73c7efbe7a2cda92 to your computer and use it in GitHub Desktop.
notes to self re. the onsubmit attribute
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment