java - Share an applet across many jsp pages -


In my web application, a series of jsp pages is navigated. These JSP pages appear on the right hand side (frame) of the screen. On the left frame, I have an applet.

This applet is normal for all JSPSs, from all JSPS, I want to call a method on applet. The javascript code is inside each jsp.

Is there any way to do this? Any way, suggestions, code snippets are most welcome.

The applet displays an image originally. Jsp pages need to change / rotate the image, and so on depending on user interaction. But the applet is common to all and should not be loaded on each JSP load. This is the reason why I am looking for a path for all the JSPS (definitely via javascript).

We say that applet frame is in F1, your Javascript frame is in F2, then you Applet can call the method with F2:

  parent.f1.document.myapplet.mymethod ("A");  

Your frameset:

  & lt; HTML & gt; & Lt; HEAD & gt; & Lt; / HEAD> & Lt; FRAMESET COLS = "50%, *" & gt; & Lt; FRAME SRC = "frame1.html" NAME = "F1" & gt; & Lt; FRAME SRC = "frame2.html" NAME = "F2" & gt; & Lt; / FRAMESET> & Lt; / HEAD>  

The page with the applet

  & lt; HTML & gt; & Lt; HEAD & gt; & Lt; / HEAD> & Lt; Body & gt; & Lt; Applet code = "myuplet class" NAME = "ip" HEIGHT = 200 WIDTH = 200 & gt; & Lt; / Applet & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

Bye


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -