post your comment   print   send to a friend
Rate:   0% | Views: 322
Question categories:  Java

How do I communicate between Applets in the same browser?

Typically, you will need some JavaScript to orchestrate the communication between applets in the same browser.

JavaScript enables flexibility and is more "top-down," or hierarchical. However, the applets can locate each other using static classes or system properties, communicating via an agreed upon object. Since classes are shared in the browser (meaning the class file is loaded once; Static fields instantiated once), you can implement a registry for an applet to locate its communicators, or a pipeFactory to return an object implementing your protocol.

Only applets from the same web server are allowed to communicate with each other. More specifically, the applets and classes must share the same CODEBASE to see each other within the JavaVM, and the MAYSCRIPT property of the APPLETtag is required to utilize the LiveConnect JSObject classes for JS related communication.

Customer Feedback
Rate:   0% | Views: 322 | Please Rate:  
 
If you have other comments or ideas for future technical tips, please type them here:

Email: (optional)

Comments: (optional)

 Server Dedicated Hosting | Domains Registration    Back to serch results
Browse the Base
Knowledge Base
Web Design
  Do It Yourself
    Java
Messages
 

Blogging at Aplus.Net

Don't forget to check out our blog ! Keep up to date at Aplus.Net.

Private Area
 
Ask
in Private
   
Personal
Folder
 
Related Questions
 
1. How do I access Servlets or CGI programs from Java?
 
2. My applet computes its window size. Can I resize it in the browser?
 
3. How do I force the browser to reload my Java classes without exiting Navigator?
 
4. Why does my java console show an applet is pruned?
 
5. Why do I get a JavaScript error using a String returned from a Java applet to index an array?
 
Home Browse Search Ask in Private Personal Folder   Help
powered by web hosting 
  Logged as: Guest