开发者

Error: Object Expected Code 0 Char 1 Line 474

开发者 https://www.devze.com 2022-12-20 17:42 出处:网络
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.

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.

开发者_如何学Python

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;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号