[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
JavaScript/Applet Function
Well, it's an inelegant solution at best, but I came up with a small function
to call an Applet from JavaScript.
However, since I still can't figure out how to pass variables I guess it's all academic.
Demo as follows :
<HTML><HEAD>
<SCRIPT>
function disp_applet ( _codebase, _code, _WIDTH, _HEIGHT, _parameters)
{
document.write( "<APPLET CODEBASE='" + _codebase + "' CODE=" + _code
+ " WIDTH=" + _WIDTH + " HEIGHT=" + _HEIGHT + " >");
document.write(_parameters);
document.write("</APPLET>");
}
</SCRIPT>
<TITLE>Applet in JavaScript</TITLE>
</HEAD>
<BODY>
<H1> Dislay Applet From Javascript </H1>
<SCRIPT>
disp_applet('classes','StarField.class','300','300','<PARAM NAME=STARS VALUE=33><PARAM NAME=SPEED VALUE=25>')
</SCRIPT>
</BODY></HTML>