I am running out of wisdom while calling applet by javascript in firefox 1.0.4. But the same code works in IE6. Any help here is greatly appreciated.
I always get the value of applet handle as null in firefox. The below is the line of code, I am calling it from another frame. And the API is the name of applet defined in jsp/html as showed at the bottom of this post.
var theApplet = parent.frames[“mscp”].document.getElementById(API);
I found the value of theApplet I got is always null in firefox, but the same code is working in IE6. I have checked the parent.frames[“mscp”].document has the valid value in firefox. And I also confirmed the applet in firefox working properly since it does generate correct logs while loading it. So, there is no issue with java environment with firefox.
I just do not know why the javascript code can not get hold of the applet in firefox, but it does in IE6.
And the below is the code where applet included in jsp, which is at frame “mscp”.
<html>
….
<body>
…….
<APPLET
CODEBASE = “./lwtapplet”
NAME = “API”
ALT = “Tracking Applet”
CODE = “LWTApplet.class”
WIDTH = “300”
HEIGHT = “400”
HSPACE = “0”
VSPACE = “0”
ALIGN = “middle”
>
<param name=”trackMode” value=”<%=trackingMode%>” />
<param name=”debugMode” value=”<%=curParam%>” />
<param name=”isVisible” value=”<%=isVisible%>” />
<param name=”userID” value=”<%=request.getRemoteUser()%>” />
<param name=”host” value=”<%=request.getServerName()%>” />
<param name=”bigDogValue” value=”<%=bigDogValue%>” />
<param name=”itrak.servlet.url” value=”<%=servletURL%>” />
</APPLET>
</body>
</html>
Does any one know what is wrong here? Thanks.