Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I created a new test.js file in the project node of my web part solution with VS 2010 and included the references:

/// <reference path="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\MicrosoftAjax.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.Core.debug.js" />

I then proceeded to write a basic test.

function test() {
    this.Cli

I stopped at the letter i. I was hoping IntelliSense would prompt me with ClientContext and help me along. This does not happen. Is this by design? I am following Microsoft procedures here for stand alone .js files. http://msdn.microsoft.com/en-us/library/ff798328.aspx

share|improve this question
add comment

2 Answers

Did you update the JavaScript Intellisense by pressing Ctrl+Shift+J ? Restarting Visual Studio should also help.

share|improve this answer
    
Yes, I tried that. I should be more clear. IntelliSense is popping up, but doesn't offer what I expect. ClientContext is not in the list of options. Thanks. –  Sean Jul 12 '12 at 15:03
add comment
up vote 0 down vote accepted

The problem is that the path to MicrosoftAjax.js was incorrect. It turns out that the Ajax tools were buried in a few places under C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7... Perform a search for the file and then copy it to the LAYOUTS directory with the others. Then perform Ctrl+Shift+J to refresh the library.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.