Welcome to MSDN Blogs Sign in | Join | Help

News

  • These postings are provided "AS IS" with no warranties, and confer no rights. Use of included code samples are subject to the terms specified Terms of Use
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.

image

Thanks,
Deepak Verma
SDET | Visual Web Developer

Posted: Tuesday, December 16, 2008 9:50 PM by WebDevTools

Comments

ffffffffffffffffffffff said:

<Script>alert('gud 1');</Script>

# December 17, 2008 12:51 AM

Visual Studio Hacks said:

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

# December 19, 2008 12:28 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker