Can't edit .JS files in VS2008

I realize this might not be the correct forum for this issue, but I've googled for a couple of days now without finding anything remotely resembling an answer, and you guys seem to know VS2008, so here goes...

If I try to open a .JS file in VS2008, a tab is created showing the file, but the "edit" section of the window (where I'd expect to see my source) doesn't update, i e it shows the contents of the tab I had open last. I can type stuff, but nothing happens, however, if I save the file, close the tab and rename the file to something else, like .JSC, it opens just fine, showing me the contents I typed in blindly.

I'm using VS2008 v9.0.30729.1 SP1 on a swedish XP Pro SP2, tried restarting VS2008, rebooting etc, nothing helps.

One workaround for me is to enclose the javascript in HTML "<script>" tags and renaming the file .htm and include it that way, but that's... ugly and ...wrong.

 If anyone could shed any light on why this happens (or even solve it), I'd be really grateful.

 

Kind regards,

 Per.

0
Peran
4/27/2009 9:41:56 AM
asp.net.visual-studio-2008 3408 articles. 0 followers. Follow

5 Replies
555 Views

Similar Articles

[PageSpeed] 33

If you right-click on the JS file in solution explorer and select Open With, what editor is specified as the default?


C# <---> VB.Net Translator
0
MetalAsp
4/27/2009 10:54:33 AM

Thanks for your reply! The default setting for .JS files is "Script Editor". Interestingly, when I right-click other files and do "Open With...", the script editor just isn't there in the list of available programs. Isn't that... er... interesting?

While I can edit the file if I open the file as source code, VS2008 isn't color-marking/intellisensing the code, which is a major drawback, probably stemming from VS2008 simply not recognizing it as Javascript code...

 Any idea on a workaround or even solution for that?

 

Per.

0
Peran
4/27/2009 11:40:12 AM

So when you do Open With, and select Script Editor and click OK, does the file open correctly, or do you still get the same problem as before?


C# <---> VB.Net Translator
0
MetalAsp
4/27/2009 12:34:28 PM

Exactly the same thing; the tab appears, but the edit window doesn't update, it's still showing the content of the previous tab. I can even jump between tabs, and all the other tabs (containing .ASP files in my case) update fine, but when I choose the .JS file, I see the contents of the previous tab.

Perhaps it's just the script editor that's gone "boom"? Is there a way to make the source code editor recognize Javascript and do all the perty coloring and intellisense that I'm after?

 

Per.

0
Peran
4/27/2009 12:47:50 PM

Back again. I've used the "repair" option from the VS2008 DVD, and that didn't make a difference either. So I guess I'm the only one with this problem? Can everyone else actually open and edit a .JS file (doesn't matter if it's imported into the project or created inside VS) in VS2008?

 

 Per.

0
Peran
4/30/2009 6:20:42 AM
Reply:

Similar Artilces:

Can't edit in design view in Visual Studio 2008
Hi all, For some reason, I can not work in the design view to edit, drag controls or type in VS 2008. When I click in design view, nothing gets selected and the "I-bar" cursor does not appear, just a white arrow cursor.  I've clicked and clicked, and all that happens is the source view page opens, (which I understand double-clicking on the page will do that, but I don't want that response, I just want to select text to edit).  I've closed and reopened VS several times and I still can not work in design view, only in source view.  Now the w...

Can't delete projects from Visual Studio .Net IDE 'Start Page'
Please ignore this post. Since posting it I found the solution but I'm not able to delete this post. nikita ...

sqlserver 2008 can't work with Visual studio 2008
when I try to make a sqldatasource with visual studio 2008 and SQLServer 2008 . I found that there are a message that the visual studio 2008 can support only SQLServer 2005 and SQLServer 2000how to make my visual studio 2008 support SQLServer 2008  Currently I don't think it can. There is an add-in for Visual Studio 2005 that gives it support for SQL Server 2008 which can be downloaded here: http://www.microsoft.com/downloads/details.aspx?FamilyID=E1109AEF-1AA2-408D-AA0F-9DF094F993BF&displaylang=en However, I do not think this will work for VS 2008, and I don't thin...

Can't add Toolkit dll to Visual Studio toolbox
HiI'm trying to use the Control toolkit in VS 2005 but i'm not having any look. When i try and add the dll to the toolbox I get the error"Cannot load file or assembly Microsoft.Web.Extensions v1.0.61025......"I am using an atlas installation. Is this the problem? I tried installing the ajax beta but it said another version was already installed. I'm worried that if i uninstall my current atlas installation, my other applications based on atlas will not run. I do not have time to upgrade these so I guess i need to know if the ajax beta is bakwards compatible.Thanks a lot...

Difference between visual studio 2008 development edition and visual studio 2008 team edition?
i see some menus changed but what is the actual difference The following link has the VS product Comparison chart: http://www.microsoft.com/downloads/details.aspx?FamilyID=727bcfb0-b575-47ab-9fd8-4ee067bb3a37&DisplayLang=en In short, Team Suite has tools that are in the Architectute, Database, and Test editions that the Development edition does not have....

Can't add the toolkit to Visual Studio 2008
 Hello,I have Visual Studio 2008 and I want to work with the toolkit. I Downloaded the latest toolkit version:http://www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx?ReleaseId=16488#ReleaseFilesand I'm trying to install them just like the video tutorial says: http://www.asp.net/learn/3.5-videos/video-224.aspx When I try to select the different DLL files inside the Binaries directory (such as BuildVsi.DLL, Tools.dll etc) I'm getting an error message: "There are no components that can be added to the toolbox".Really need your help!Thanks,   Hi...

can't launch Visual Studio 2008 as administrator
I used to be able to do this, and it is required when I want to work on the locally hosted website, but now I can't launch Visual Studio 2008 as administrator. If I rightclick on the icon, I can see and select 'run as administrator', but then nothing happens. I can still run it under my own account. (But then I can't copy my website to the local IIS server). How can I correct this? I have a second machine, where I do launch VS if I right click and select run as administrator. But for some unknown reason, the first machine does not. Any ideas on what to compare? ...

I can't get no cache, I can't get no cache. 'Cause I try and I try and I try and, I can't get no, I can't get no cache.
I have fiddled out for days tinkering with the setting in about:config trying to get FireFox 12 to use the disk cache. I have NOT found the trick. This One Trick Pony ain't doing it like it used to up until recently. Pray tell anyone, What information can I share that will point a knowledgeable person to aid me in getting FF to disk.cache? I have also tried restarting FF with add-ons disabled, (There were NOT too many to do this to, so it was quick and easy) Here is my stab at trying to convey the information that MIGHT govern matters Using about:cache Informatio...

.js file doesn't understand $get command
var adiv = $get('ctl00_AlertDiv'); alert(adiv);  If i put this in a .js file <atlas:ScriptReference Path="~/Includes/Async.js" ScriptMode="Auto" />  It comes up null. If I put the code in the masterpage in a script block without a .js file - it works  WHY? actually  adiv = $get('ctl00_AlertDiv'); works  adiv = $get('<%=AlertDiv.ClientID%>'); doesn't why  That "<%= %>" syntax is ASP.NET.  If you put this code in a .js file, ASP.NET is not processing the file (and thus not understanding <%= %>). One idea: you could pu...

Re: I can't get no cache, I can't get no cache. ' Cause I try and I try and I try and, I can't get no, I can't get no cache.
<div>please com e see me about htis<br /> <br /> ------- Original Message f= rom the Global Relay Archive -------<br /> From: Hp &lt;ferd@farkel.net&gt;= <br /> To: "support-firefox@lists.mozilla.org" &lt;support-firefox@lists.mo= zilla.org&gt;<br /> Sent: Sun, 27 May 2012 18:30:18 -0700<br /> Subject: I = can't get no cache, I can't get no cache. 'Cause I try and I try and I try = and, I can't get no, I can't get no cache.<br /> <br /></div> <pre class=3D"gr-maex-body-pre&qu...

I can't create web application with visual studio .net
Hi When I create a new web application with visual studio .net on my computer (XP with IIS 5.1), only to get a " Visual Studio .net has detected that the web server running is not ASP.net 1.1 . You can't run a web application" . But I have installed .NET FrameWork 1.1 . What's wrong? You need to start the IIS (Web services). If you are using XP home edition, then check for this url: http://www.15seconds.com/issue/020118.htmOm Prakash Hi, You have to register your asp.net with the IIS. go to the VS.Net Command Prompt and type aspnet_regiis -i this ...

Visual Studio can't open .sln file error
I get an error when I open the .sln file: Visual Studio .NET cannot create or open the application. The likeliest problem is that required components are not installed on the local Web server. Run Visual Studio >NET setup and add the Web Development component. I've checked the setup and the web development components are installed. Thanks dp Can you open other web apps? If yes, What steps did you follow for installing DNN and what version is it? Also what version of VS are you using? Do you know the truth when you hear it? Hi, I cannot create an ASP.NET...

Can't view project using Visual Studio 2008
Hi,I've recently installed Visual Studio 2008 and using VS I've opened a "website" folder on my computer so I can make some amends.The location of the folder on my computer is P:\Castle Point Business Forum\Website\cpbusinessforum.co.uk\But I've noticed that there is a problem viewing files in a browser using VS (e.g. it's own variation of localhost), where by all my fully functioning websites display the below error message. Can anyone please advise what might be causing this problem and how to resolve it. There is nothing special happening in my application, ...

visual studio 2008 can't find sharepoint installation
 I'm trying to create a workflow project (either type) in VS 2008, but it doesn't recognize the sharepoint site I pointed for debugging. The error message it provided is:sharepoint server not installed. please run miscrosoft office sharepoint server 2007 Does anyone have a solution for this? Help is appreciated. ...

Web resources about - Can't edit .JS files in VS2008 - asp.net.visual-studio-2008

Resources last updated: 12/20/2015 1:23:11 AM