SharePoint intellisense for JavaScript in visual studio   

Tags: SharePoint 2010, General
Technorati Tags: ,

I was searching the web today how I could enable SharePoint intellisense for JavaScript.

I found the following solution.

 

The Solution:

 

Step 1: Add the following reference => System.Web.Extensions

extension

 

step 2: Create a new JavaScript file and name it: “theBom.js”

 

theBom

 

step 3: Add the following javascript reference

 

/// <reference name="MicrosoftAjax.js"/>
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.js"/>
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.Core.js"/>
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\core.js"/>
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.debug.js"/>
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.UI.debug.js"/>
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.UI.Core.debug.js"/>
/// <reference path="C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\14\\TEMPLATE\\LAYOUTS\\SP.UI.Dialog.debug.js"/>

 

The reference we use in JavaScript is like a using in C#.

 

step 4: For the last step we need do press the following keys => ctrl + shift + j . This will update the intellisense  for the JavaScript.

 

 

Soruce: http://davemcmahon81.wordpress.com/2010/12/28/getting-sharepoint-2010-javascript-intellisense-to-work-in-vs2010/

 
Posted by  Gilissen Timmy  on  9/28/2011
0  Comments  |  Trackback Url  | 0  Links to this post | Bookmark this post with:        
 

Links to this post

Comments

Name *:
URL:
Email:
Comments:


CAPTCHA Image Validation