Hi! I’m using onsubmit in my form tag to call javascript functions for form validation. I have no problem if I include the functions in the same file as the form but would prefer to have the functions in an external file. The latter I’ve been unable to do despite the fact that the external file is properly linked (other functions in that file can be called without problem).
This is the syntax I’ve used thus far (firstName and lastName are input ids):
<form action=“URL”
onsubmit=“return (
functionName(this.firstName, otherArguments)
&&
functionName(this.lastName, otherArguments)
&&
.
.
.
);”>
Again, it works if the functions are in the same file as the form but not if they’re in an external file.
Sorry if there’s something basic/silly/obvious I’m overlooking. If there’s some place on this site to which I could have gone to get this info, please let me know!
Thanks!
James