[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launching a Plug-In



The general (easiest?, only?) way to "launch" a plug-in is to use JavaScript
to write the <EMBED> tag for the plug-in. This can be done when the document
first loads, or if you have frames, it can be done at any time.  For
example, I have a little script that "announces" the day using the ToolVox
plug-in (okay, so it's stupid, but at least it shows the basic idea!)  The
script loads with the document, and plays as the rest of the document is
coming across.

<HTML>
<HEAD>
<TITLE>A Diufferent Sound Each Day!</TITLE>
<!--From JavaScript Sourcebook -->
</HEAD>
<BODY>
<SCRIPT>
now = new Date();
Today = now.getDay();
if (Today == 0) Soundfile = "sunday.vox";
if (Today == 1) Soundfile = "monday.vox";
if (Today == 2) Soundfile = "tuesday.vox";
if (Today == 3) Soundfile = "wednesday.vox";
if (Today == 4) Soundfile = "thursday.vox";
if (Today == 5) Soundfile = "friday.vox";
if (Today == 6) Soundfile = "saturday.vox";
Text=""
Text += '<EMBED SRC="' + Soundfile + ' " PLAYMODE="auto"'
Text += ' VISUALMODE="embed" height=82 width=160>'
document.write (Text);
</SCRIPT>
</BODY>
</HTML>

-- Gordon
http://gmccomb.com/javascript/

At 01:55 PM 3/14/96 PST, you wrote:
>
>Hi,
>     Anyone know if it's possible to launch a Netscape plug-in from 
>JavaScript and if so, what the syntax might  be?  Thanks so much for any 
>help!
>
>Cherie
-- Gordon
http://gmccomb.com/javascript/


--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/