... ...
Home
Download
Docs
Examples
Login
Support
Forum
Contact Us
... ...

Diagnostic Wizard: Test Java to JavaScript Communication using LiveConnect

LiveConnect is the technology that allows JavaScript to call Java and Java to call JavaScript. It needs to be enabled by calling the MAYSCRIPT command in the Applet tag. Please view the Applet source for this page for a precise example.

There is an Applet parameter called MAYSCRIPT that enables LiveConnect. Different browsers seem to have different requirements for how MACSCRIPT should be set. But if you set MAYSCRIPT="true" then it should work on most browsers.

Try these different values for MAYSCRIPT:

Results of tests made with:

  • IE6 on Windows with Java 1.6.0_02
  • FireFox on Windows XP with Java 1.6.0_02. Note: If you try LiveConnect without MAYSCRIPT call then you may have to restart browser to get it to work even with MAYSCRIPT.
  • FireFox 2.0.0.6 on Mac OS X with Java 1.5.0_07
  • Safari 2.0.4 with Java 1.5.0_07
 
IE6 on Windows
FireFox on Windows
FireFox on Mac OS X
Safari on Mac OS X
MAYSCRIPT
JavaScript to Java
Java to JavaScript
JavaScript to Java
Java to JavaScript
JavaScript to Java
Java to JavaScript
JavaScript to Java
Java to JavaScript
not called
OK
OK
OK
--no--
OK
--no--
OK
OK
called but not set
OK
OK
OK
OK
OK
OK
OK
OK
"true"
OK
OK
OK
OK
OK
OK
OK
OK
"mayscript"
OK
OK
OK
OK
OK
OK
OK
--no--

LiveConnect Links