Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to use multiple .js files?

Status
Not open for further replies.

adknbvi

Programmer
Apr 17, 2001
25
US
Hello,
I am getting ready to start my first "real" HTML/ASP/JavaScript/SQLServer project, and I'm just trying to scope out the situation.

I am used to writing projects that involve dozens of files worth of code. Each one may be relatively small but organized.

As I look through the books I have purchased on JavaScript and ASP, they all talk about the ability for the HTML page to access "a" .js file.

Is it possible to break up the code into multiple files? If so, how do I reference them in the HTML and from other .js files when needed?

Any help would be appreciated.
Thanks in advance,
Valerie
 
I never actually tried it but come back here if it does/does not work..

you should be able to to put multiple lines in like this:

<SCRIPT language=&quot;JavaScript&quot; src=&quot;file1.js&quot; type=&quot;text/javascript&quot;></SCRIPT>
<SCRIPT language=&quot;JavaScript&quot; src=&quot;file2.js&quot; type=&quot;text/javascript&quot;></SCRIPT>


come back and tell me if it works as I am at work right now and haven't got time to try it, sorry. You're only as good as your last answer!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top