Save your script in a file with a ".js" extension, for example, "myExternal.js" Do NOT put <script> tags in the file. In your HTML, you reference the file:
<SCRIPT language="JavaScript" SRC="myExternal.js"></SCRIPT>
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Skill Endorsements: 1
Whether or not you need "type=" depends on which doctype/HTML version you're using. Firefox parses external JavaScript just fine, and always has. What do you mean by "format" when you say you don't know how to format the JavaScript file? It's a file that contains JavaScript, pure and simple.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Skill Endorsements: 1
Any collection of JavaScript variables, functions, and objects can be called a "script". Yes, you can put them all into the same file.
At this point I think you have enough information to experiment. I think you'll be able to answer most of your own questions by trying it out. If not, let us know!
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Skill Endorsements: 1
You've been no bother at all, you've used the forum for exactly the reason it's here: to ask questions and get enough info to tackle problems. I was just, perhaps tactlessly, encouraging you to learn via experimentation. In my experience, that's the best way to learn!
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Skill Endorsements: 1