I know this question is probably very much on the "supposed-to-know" end of things.... but I'll ask anyway.
I have validation js in php forms pages on my site. The validation works fine when I have it in the form .php page but when I pull it out and put it in a separate .js file, it no longer works.
Can someone point me to what piece of knowledge I'm missing?
Here's a fragment of the code:
Also, when I do the include (putting the js in a separate file), I do it like this: