Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 5th, 2010, 07:48 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default Visual Studio 2010 and JQuery Intellisense

Visual Studio 2010 has very nice jQuery intellisense support, but I have to add a hint at the top of my javascript file - a reference path to the vsdoc file.

Is this how it supposed to be? I am using Visual Studio 2010 beta 2 and JQuery 1.4.2. By the way, does anybody know whether there is a vsdoc for 1.4.2? I am using 1.3 vsdoc.
  #2 (permalink)  
Old March 6th, 2010, 08:37 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Version 1.4.2 of the jQuery library was recently released and it takes some time before the VS doc file becomes available. You can find the 1.4.1 version here: http://www.asp.net/ajaxlibrary/cdn.ashx

Most of the times, VS will figure out the doc file based on the script files you're referencing. In a JavaScript file it makes sense. VS doesn't know where this file is going to be used, and thus doesn't know what other script files are available. Adding an XML doc reference fixes the problem and brings the documentation in the referenced file in scope.
You may want to up upgrade from beta 2 to the RC version.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #3 (permalink)  
Old March 6th, 2010, 01:03 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

From VS design point of view... If I use jquery for javascript, likely I will use it consistently. So a better way is to have a VS setting that lets me specify jquery vsdoc as the default for all javascript files, instead of having to comment each file.
  #4 (permalink)  
Old March 6th, 2010, 01:09 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It has to know you're using jQuery somehow. It does this (AFAIK), by following script references in pages and other files that are in scope.

Try http://connect.microsoft.com if you want to file enhancement requests for VS....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #5 (permalink)  
Old March 6th, 2010, 01:15 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

I will submit a request for enhancement. Thanks.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Studio 2010 in Focus at Great Indian Developer Summit 2010 shaguf5575 ASP.NET 1.x and 2.0 Application Design 0 February 24th, 2010 07:03 AM
Visual Studio 2010 in Focus at Great Indian Developer Summit 2010 shaguf5575 ASP.NET 1.x and 2.0 Application Design 0 February 24th, 2010 07:02 AM
Visual studio 2005(32 bit) code not work in visual studio 2008 on windows server 2008 gr8.jain Visual Basic 2008 Essentials 1 August 31st, 2009 10:07 AM
Visual Studio 2003 vs. Visual Studio 2005 eitanbarazani C# 2005 4 May 9th, 2006 01:34 AM
Visual Studio .net2003 and Visual Studio 2005 Gert Visual C++ 1 January 24th, 2006 05:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.