0

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

2 Answers 2

1

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

1
  • 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. Commented Jul 12, 2012 at 15:03
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.