java - JavaScript error when importing a package -
getting following error when importing netscape.javascript
importclass(netscape.javascript)
org.mozilla.javascript.ecmaerror: referenceerror: "netscape" not defined.
trying use javascript within applet access cookies. using following example import required package
http://www.java2s.com/code/java/jdk-6/usingjavaobjectsinjavascript.htm http://docs.oracle.com/javase/tutorial/deployment/applet/invokingjavascriptfromapplet.html
found out trial , error.
it seems need prefix packages
importpackage(packages.netscape.javascript);
Comments
Post a Comment