I would like to call a javascript function in an external JS file, using the onClick function on a button in this file, form.tmpl.htm.
<button type="button" value="Submit" onClick="Call the external js file" >
The javascript file is in Public/Scripts/filename.js. I have a template file in template/form.tmpl.html. The root folder contains the Public and template folders.
I have to agree with the comments above, that you can’t call a file, but you could load a JS file like this, I’m unsure if it answers your question but it may help… oh and I’ve used a link instead of a button in my example…