Tip #35: Did you know…How to add Intellisense from script libraries for JS files?

Here is an example to add intellisense for JS files in VS 2008.

So, you have two Javascript files

Jscript1.js with the following code

function validateForm() {

and Jscript2.js (wherein you want current JScript file to show intellisense including objects & functions declared in Jscript1.js)

Now to add intellisense, from the solution explorer drag drop Jscript1.js into Jscript2.js.

You will notice that the following Jscript document comment has been added to the Jscript2.js file.

/// <reference path=”JScript1.js” />

And now you can start using the intellisense, try typing in validateForm in Jscript2.js.


Deepak Verma
SDET | Visual Web Developer

Comments (2)

  1. <Script>alert(‘gud 1’);</Script>

  2. My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. The Web Developer Tools Team has posted a few new tips: Tip #34: Did you know… How to stop hot-linking from your site using URL