I have a JS file having contents:
function rejectIfNotSuccess(response) {} usernameChanged(event) {}
for example, and I want to include this file in my velocity template in order to do things the same way we do in an HTML file.
For example, I want to call a function defined in this JS file in velocity using <input type="text" id="username" onInput="javascript:usernameChanged(event)" />
How can I do so? I read here about a way to do so, which may work. But, are there any other better ways of doing the same?
Thanks Stephen for your answer!