[ie set the default editor for files with extension .js (or whatever) to HTMLEditor - via the Open With... dialog.]
Then add the line:
//<script language="javascript">
as the first line of your .js file
There you go, you now have colored keywords etc. when you view the source of the .js file. This should also work for other script file extensions such as .vb (where the top line would be:
'<script language="vbscript">
instead)
NOTE: This top line tells the HTML Editor which language to use - but MUST be prefixed with a comment character of that language ([color red]//[/color] or [color red]'[/color]) - else it will error at runtime.
NOTE 2: .js, .vb / .vbs and .inc files will be displayed as plain text in any browser that navigates to that file. To HIDE these files from prying eyes, simply change the file extension to .ASP.
NOTE 3: Include files do not need this top-line comment - as they should already have any language tags in them.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.