Applet and Java Plug-in
843807Dec 5 2002 — edited Dec 11 2002I am using Java Plug-in with an applet.
The applet is invoked from the JSP page.
When I resize the container frame I want to resize the applet frame so I have a resize() function in the JSP which invokes the setSize() function in the applet on resize and on Load.
I am getting an error "Object does not support this property or method" when the resize() invokes the "document.ViewerApplet.setSize(w_newWidth,w_newHeight);"
What might be the reason?
Here is my JSP code:
<SCRIPT LANGUAGE="JavaScript">
function resize()
{
var w_newWidth,w_newHeight;
.....
document.ViewerApplet.setSize(w_newWidth,w_newHeight);
window.scroll(0,0);
}
window.onResize = resize;
window.onLoad = resize;
</SCRIPT>
<BODY onResize="resize()" onLoad="resize()">
....
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
NAME = "ViewerApplet" WIDTH = 400 HEIGHT = 500 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<PARAM NAME = CODEBASE VALUE = "." >
<PARAM NAME = CODE VALUE = "com.plx.ifo.client.gui.imageViewer.imgViewerApplet.class" >
<PARAM NAME = ARCHIVE VALUE = "Viewer.jar" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="false">
<PARAM NAME = "pagecount" VALUE ="<%=strPageCount%>">
<PARAM NAME = "url" VALUE ="<%=strURL%>">
</OBJECT>
</BODY>