зеркало из https://github.com/mozilla/pjs.git
73 строки
2.5 KiB
HTML
73 строки
2.5 KiB
HTML
<HTML>
|
|
<H1> Simple LiveConnect Sample Plug-in </H1>
|
|
|
|
<p> This sample plug-in demonstrates how to write a
|
|
LiveConnect-enabled plug-in. You should see in the plug-in rectangle
|
|
below the text "Hello World" and messages written to the Java Console
|
|
and to stdout to tell you what it's doing. And if you click the
|
|
JavaScript button, it will tell you another thing or two.
|
|
|
|
<HR>
|
|
|
|
<center>
|
|
|
|
<EMBED type=application/x-simple-plugin name="simple1" width=400 height=300>
|
|
|
|
<form>
|
|
<input type=button value="Click Me"
|
|
onclick='document.simple1.doit("Hello from JavaScript!")'>
|
|
</form>
|
|
|
|
<h4>Open the Java Console (under the Options menu) to see the
|
|
output!</h4>
|
|
|
|
</center>
|
|
|
|
<h4>Problems?</h4>
|
|
|
|
<ul>
|
|
|
|
<p><li><b>I don't see any output in the Java Console or to stdout</b>:
|
|
This is probably because the Simple.class file isn't installed
|
|
correctly. For Macintosh, the class file must be in "System
|
|
Folder:Preferences:Netscape Ÿ:Java:netscape-classes". (In the next beta
|
|
release it should be possible to simply place the class file in the
|
|
plugins directory.) For Windows, the class file should be in the Plug-in
|
|
folder along side the DLL.
|
|
|
|
<p><li><b>I still don't see any output in the Java Console or to
|
|
stdout</b>: This may be because you don't have your moz3_0.zip file in
|
|
the proper place. Try visiting a page with an applet to see if it
|
|
works. Also make sure that Java isn't disabled (under the Options
|
|
menu, Network Preferences..., Language).
|
|
|
|
<p><li><b>I get a dialog offering to download the plugin</b>: This is
|
|
most likely because the Plug-in file (npsimple.dll on Windows,
|
|
npsimple.so on Unix, or SimplePPC on PowerPC Mac) isn't installed in the
|
|
plug-in directory. Also check that the list of helpers (under Options,
|
|
General Preferences..., Helpers) contains an entry for type
|
|
application/x-simple-plugin that names the Simple LiveConnect Sample
|
|
Plug-in.
|
|
|
|
<p><li><b>I get Java Console output, but nothing to stdout</b>: If
|
|
you're on a Mac, forget it. You'll never see stdout. If you're on a
|
|
Windows machine and you launched the Navigator by double clicking an
|
|
icon, you also won't get any stdout.
|
|
|
|
<p><li><b>When I click the button, I get an error dialog from
|
|
JavaScript saying "Window.Function.Document.simple1 has no
|
|
properties."</b>: This is because the Simple.class file was not found
|
|
in the Plug-ins directory. You'll also notice that you're not getting
|
|
any messages to the console in this case.
|
|
|
|
<p><li><b>Other problems?</b>: Check with the Netscape
|
|
LiveConnect/Plug-in developer's news group, <a
|
|
href="snews://secnews/netscape.devs-plugins">
|
|
snews://secnews/netscape.devs-plugins</a>.
|
|
|
|
</ul>
|
|
|
|
<HR>
|
|
|
|
</HTML>
|