Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...This is easily the most helpful website I've ever used, and this is the best forum with the quickest response time bar none...."

Geography

Where in the world do Tek-Tips members come from?

Microsoft: Visual InterDev FAQ

Interdev IDE

Syntax Colouring in .JS, .INC and other files
Posted: 23 May 01

If you want syntax colouring (coloring), pop-up property lists etc. then you need to use the HTML Editor for the source files:

The following solution was provided by Dan_Guest !  It works and is very easy...

Do what they say to do here for a .js file (instead of a .htc file that the article is concerned with):

http://support.microsoft.com/support/kb/articles/Q200/8/74.ASP

[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 (// or ') - 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.

Back to Microsoft: Visual InterDev FAQ Index
Back to Microsoft: Visual InterDev Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close