My issue arises specifically with Firefox 12 (newer versions of Firefox and other browsers function correctly).
In Firefox 12, MyApplet is showing as undefined.
However, in other browsers, everything is running smoothly.
The same goes for newer versions of Firefox, where everything works well too.
Nonetheless, I am looking to resolve this issue in Firefox 12 as well.
....
....
<html>
<head>
<script type="text/javascript">
function callbackFunction() {
....
MyApplet.getData();
// The issue persists as 'MyApplet' remains undefined in Firefox 12.
....
}
</script>
</head>
<body >
<script src="https://www.java.com/js/deployJava.js"></script>
<script >
var javaVersion='1.6';
var startApplet = function(){
var attributes = {
id: 'MyApplet', scriptable: 'true',
code:'X.Y.Z.MyApplet.class',
archive:'<%=request.getContextPath()%>/applets/MyApplet.jar'
};
var parameters = {
challenge : "${serverChallenge}",
callbackFunction : 'callbackFunction()',
language: "${pageContext.response.locale.language}"
};
var version = '1.6';
deployJava.runApplet(attributes, parameters, version);
}
startApplet();
</script>
</body>
</html>
Is there a way to address this problem using JavaScript or similar techniques?