faqts : Computers : Programming : Languages : JavaScript : Language Core : Variables

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

14 of 20 people (70%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Is it possible to create a file of constants for use throughout a website's other javascript routines?

Apr 16th, 2000 14:11
Martin Honnen, T Smith,


You can stuff you constants into a .js file and include it with
  <SCRIPT SRC="constants.js"></SCRIPT>
in the html page. Works with NN3+ and IE3.02+.