开发者

is jsobject eval method of java is same as eval method of javascript

I have read so many times on these and other forums that you should not use eval() in JS. I am writing outputs from java applet to the browser, using JSObject eval method in import netscape.jav开发者_StackOverflow中文版ascript.*;, its working fine in FF but on IE I am getting the Unspecified errors, if I lighten up the DOM by removing menus etc, this problem will go away then, I have tried everything but couldn't get to the problem.

Read on these forums that if it is absolutely necessary to use eval then do that in try catch block in IE to avoid unspecified error, now since Java is calling it, this can not be put in try and catch block for JS (in java it is already in try catch block).

The question is the Java implementation of JSObject eval is same as for browser's eval method? I know that a browser should have its implementation of JSObject for it to work with applet.

Am I on right theory? if this is the case, any work arounds if possible?

Thanks

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜