Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Applet and Java Plug-in

843807Dec 5 2002 — edited Dec 11 2002
I 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>

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 8 2003
Added on Dec 5 2002
5 comments
122 views