开发者

javascript eval statement JS Frames error

In this legacy application there is a javascript eval statement:

 eval(getElementText(VALUE[0]));

The command that it generates is a call to another function. However, in the screen that I'm dealing with that function never gets called in Firefox. Instead FireBug generates this information:

uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMWindowInternal.alert]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://localhost/mywebserver/default.asp?bn=0.12345E-02&p=1&开发者_如何学运维;p2=1 :: ParseABCScreen :: line 718" data: no]

In IE9 believe it or not I get a little further but then I get a very generic unspecified error. Which shows me nothing.

Does anyone have any suggestions?


What I've managed to patch together from some searching is that this error occurs when you have an ajax call and in the error callback you attempt to check the status of the XMLHttpRequest. Apparently you're not supposed to do that.

Apparently it only happens in firefox because they're the only ones that follow the spec exactly.


This type of error generally comes when trying to eval a javascript code with large amount of escaped data. System considers it as an attempt to inject some mallicious data.

One workaround is to put a try/catch statement on eval.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜