done some html code updates on my company's asp.net website and the above error appears.
i dont have a line 474 on the errored file.
this error only on IE, and not FF.
anybody?
Check inside the source control and try eliminating the changes 1 by 1 until the problem is under control. Then you should have the change that caused it.
It's a javascript error. You're trying to dereference a null pointer in javascript.
These go quietly unless Script Debugging is turned on in IE. If that's the case, you can debug the error by choosing to debug with Visual Studio. Visual Studio Express Web Developer may do as well.
You may be able to see the bug in Firefox as well. Go to "Tools" > "Error Console" in Firefox. Select "Errors", then "Clear" toolbar buttons. Refresh the page then you may see the actual javascript line that's causing the error.
I'll bet you DO have a line 474. Maybe not in your aspx page in Visual Studio, but probably in your browser window. Run the page and view source inside your browser. Then go to line 474 (maybe by pressing CTRL-G). That should point you to the spot.
Another possibility is that the JS error is talking about line 474 in a linked .js file.
Have you tried debugging the page in Visual Studio have you been editing in Notepad? If you debug in VS, you'll see the JS error right away.
As mentioned this codingforums thread, in JScript (IE's equivalent to JavaScript) you should avoid using variable names that are equal to your HTML field names or reserved words for JavaScript/JScript (and possibly HTML?).
So avoid the likes of:
var myname = document.myform.myname.value;
var text = document.myform.myname.value;
Related
Some strange issue appeared while working in Visual Studio 2010.
Formatting for whole CSS file works fine CTRL+K,CTRL+D, but trying to format code inside of selection CTRL+K,CTRL+F shows an error:
The key combination (CTRL+K, CTRL+F) is bound to command (Format Selection) which is not currently available.
Does anybody know what causes this behaviour?
When trying the second command, were you still formatting CSS or a different file type (.cs)?
Code which requires compiling can't be edited whilst running (debugging). HTML, CSS and Javascript can be edited whilst the code is currently running.
Not sure if that is the cause of your issue but that is how I can reproduce it.
Sometimes we get "Unspecified error" in IE (javascript error), when using MaskedEdit.application build in framework 2.0
if i enable the debuggin javascript setting then i found this error otherwise a particular part of the page doesnot display.
If we debug we can see that it happens on below line
//only for ie , for firefox see keydown
if (document.activeElement)
{
if (e.id == document.activeElement.id)
{
hasInitialFocus = true;
}
}
when i tried to search where this code is written then i found this code in ajaxcontroltool.dll file.
and this dll is of third party and i can't change in this dll so what should i do to solve the problem.
i tried this in IE8,but i didn't get the error in IE8 it means the code run smoothly/errorless in IE8.
i get this error in IE9 as occurence ratio of once in 6 times open a page.
it became my headache if any one know please help me out of this.
It looks like a browser issue or dll issue.
Has anyone else noticed this?
Thanks and regards
shoaib
and this dll is of third party and i can't change in this dll so what should i do to solve the problem
Actually you can, as the AjaxControlToolkit is an open source project. You can download project source code from the CodePlex: http://ajaxcontroltoolkit.codeplex.com/ and customize it for your needs
I use Visual Studio as my editor for .css and .js files.. It REALLY SUCKS especially with .js files since it insists on indenting them in a very weird way, but I find it convenient that the first alt-tab is always the browser instead of another editor, and that ctrl-tab is always either the code file or the css/js.
Anyways, in all its radiant wisdom it decides to check them for syntax errors as well and every time I compile my project it gives several "errors" that push down the real errors of the compilation, so every time I make a syntax error in a code file I have to scroll down through all the js/css errors to see what's wrong.
Examples of such errors (that aren't really errors) are:
Error 7 Validation (CSS 2.1): 'text-rendering' is not a known CSS property name.
Error 8 Validation (CSS 2.1): 'opacity' is not a known CSS property name.
The situation also got much worse recently, since it now keeps parsing a .js file as a .css file for some reason, so I get errors such as:
Error 1 Unexpected character sequence. Expected a selector for the style rule. E:\Dev\anacletus\Static\set_focus.js 2
Error 2 Unexpected character sequence. Expected a property name for the " : " declaration. E:\Dev\anacletus\Static\set_focus.js 3
Error 3 Validation (CSS 2.1): 'set-focus' is not a known CSS property name. E:\Dev\anacletus\Static\set_focus.js 3
I even deleted that particular file from the solution (it's not there anymore anywhere), but it keeps parsing it anyway.
In short, how can I disable this feature?
Enter the options through
Tools > Options
If it isn't checked, check the "Show all settings" box at the bottom of that window.
In the tree to the left, choose:
Text Editor > CSS > CSS Specific
Uncheck "Detect Errors". Then, choose:
Text Editor > JScript > Miscellaneous
Uncheck "Show syntax errors".
You can also change how it indents each type of code too, in the various settings in those "Text Editor" sub-options.
I know, this question is old, but I have an update (for Visual Studio 2010):
The accepted solution has a big disadvantage: It disables all syntax checking of CSS and JScript.
If you still want to have meaningful warnings, you can do the following workaround.
It will treat errors as warnings, and it will do css validation on css V3.0 level rather than on (old) css V2.1:
Close Visual Studio
Download and install the web standards package for Visual Studio 2010 SP 1
Open the path (on 32 bit machines, it is Program Files)
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\1033\schemas\CSS
Backup CSS21.xml for safety reasons
Overwrite CSS21.xml by the file CSS30.xml (in the same directory)
Open Visual Studio. In Text Editor settings, (re-)enable "Show syntax errors". Ensure you have checked "as warnings" too.
From now on syntax checking of CSS is done on 3.0 level (although it appears in Visual Studio now as 2.1), and you're getting warnings instead of errors if the syntax checker finds anything.
(Note that the Style Sheet toolbar only allows to enable CSS 3.0 checking for css files, not for HTML. Hence, this fix is needed if you want to keep syntax checking)
A typical CSS property that I use often is overflow-x or overflow-y. Sometimes I use CSS 2.1 or later properties or selectors. These (correctly) raise a validation error:
Validation (CSS 2.0): 'overflow-y' is not a known CSS property name.
For years I ignored this, but it kinda feels wrong. It's possible to switch off warnings in C# and other languages for a particular line, block, file or project. Is something similar possible for CSS (or HTML) errors or warnings? Instead of switching it all off, I prefer a more granular solution.
If you're willing to muck around a bit you can get exactly what you want.
Go to Visual Studio folder \Common7\Packages\1033\schemas\CSS
Copy css21.xml to css21mod.xml
Find the section:
<cssmd:property-def _locID="overflow" ...
After that section, insert:
<cssmd:property-def
_locID="overflow-x" _locAttrData="description,syntax"
type="enum"
description="Visibility of content extending beyond element's dimensions in x"
syntax="One of the overflow values | inherit"
enum="inherit auto hidden scroll visible"/>
<cssmd:property-def
_locID="overflow-y" _locAttrData="description,syntax" type="enum"
description="Visibility of content extending beyond element's dimensions in y"
syntax="One of the overflow values | inherit"
enum="inherit auto hidden scroll visible"/>
Open regedit, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Packages\{A764E895-518D-11d2-9A89-00C04F79EFC3}\Schemas
If on 64-bit, you will have to go to SOFTWARE\Wow6432Node\Microsoft etc
Create a new key called Schema 5, and fill in the "File" and "Friendly Name" string values with css21mod.xml and CSS 2.1 (mod)
Should be all set!
Hi I just discovered this. In Visual Studio 2010 SP1 there is support for HTML5 validation.
Tools -> Options -> Text Editor -> HTML -> Validation
Now personally because I hate VS telling me I have duplicate ID's(Which is fine for non server controls) I turn off all warnings and set my validation to XHTML5 (Which is an option).
You can however tweak the settings till your hearts content. Sadly this is not project specific and other team members will need to do the same.
How to make Visual Studio stop "compiling" .js and .css files
Similarly as Jeremy Child suggested, but specific for Visual studio 2008 (as specified in the opriginal question):
Tools -> Options -> Text Editor -> CSS -> CSS Specific : uncheck
"Detect unknown properties"
This removes all CSS validation. This is a good solution if you need the problem to disappear fast (I have no time/bit lazy to manually add each property in an xml file and check the windows registry...) and if you are good in CSS (validation not really needed when you use built-in intellisense or styles that you are sure work -e.g. taken from previous websites you did-).
Get support for CSS 3.0 in order to suppress some of the warnings:
how to make visualstudio 2008 support css v3 & html v5
CSS 3 Intellisense Schema
So this is what happened to me. I had a successfully working project. I made a copy and started working on some label changes. And I started getting
"Validation (CSS 2.0): 'overflow-y' is not a known CSS property name."
The above error kept appearing even after reopening the projects.
So I went back to my original project, opened, started debugging to see if I get that error in that project also. The project successfully. Stopped there. Came to my new error throwing project, and now the error is no longer there.
Something to think about what caused it go away. Something in a memory. May be
I have an instalation of Umbraco 4.0.2.1. In internet explorer (6 / 7) i get an error when trying to insert a link using the tiny MCE rich text editor. basicaly what happens is i can choose the node in the site i want to link to but when i click insert it reloads but the tiny MCE popup does not dissapear and i get the following page error.
Line: 368
Char: 9
Error: 'the Form._SCROLLPOSITIONX.value' is null or not an object
code: 0
URL: "mydev server"/umbraco/plugins/tinymce3/insertLink.aspx
I dont get this problem in Firefox and i have other instalations of umbraco 4.0.2.1 in which this error does not occur. I have tried using WinMerge to comparing the code of the two instalations and they seem identical in all the places i can think would have an effect on tinyMCE ("bin", "umbraco_client\tinymce3", "umbraco\plugins\tinymce3")
I am pulling my hair out over this and any help would be very much appreciated.
I'm not sure about this, but at first glimps I noticed the URL in the error message:
"mydev server"..
My guess: the javascript code cant handle the quotes in the url.
possible solution: remove the space from your server name.
again, its just a guess, hopefully will solve your problem.