Is it possible to pass a variable to a linked .js file? I tried this:
No, but you can pass a the value directly to a function in that file or set a variable value that will be used in the external file.