Search code examples
javajavascriptappletjapplet

Applet and Object Tag JSP interaction


I have an applet in a web application (JSP page) in one domain somedomain/myjsp.jsp embedded via object tag and i have another object tag in the same jsp which loads some other domain url anotherdomain/another.jsp .I am unable to call the applet function from the jsp page of another domain.

function enableToUpdate() 
    {
     window.parent.document.MyApplet.EnableButton();               
    }

Solution

  • I think the problem is, the jsp is runing in the server jvm. The applet is running in the client jvm.

    This are two diferent programs in two different jvms. One can not call a function in the other.

    You can use JavaScript: http://docs.oracle.com/javase/tutorial/deployment/applet/invokingAppletMethodsFromJavaScript.html