emmyie2000
Programmer
Hi there,
I was wondering if it's possible to initialise an applet from within a Javascript function. I'm trying to set up a submit button so that when clicked it will trigger the applet to run on that page. Here is what i have so far:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function submit()
{
document.write("Parsing Java program......."
//initialise Applet here??!!
document.write('<APPLET CODE = "blah.class">')
}
//-->
</SCRIPT>
<DIV ID = "second">
<FORM>
<CENTER><B>Click submit to run the parser on your chosen Java program <BR>
<INPUT TYPE = "SUBMIT" VALUE = "SUBMIT" onClick = "submit()"></B></CENTER>
</FORM>
</DIV>
<BR><BR>
Will this approach work?? Also is it possible to do this if the program running in the applet takes another program as input?? i.e. the user browses for a java program in their directory, and then clicking submit triggers the running of the applet program based on that input program???
using the <PARAM TYPE> tag??
Any help would be appreciated.
Thanks a lot.
I was wondering if it's possible to initialise an applet from within a Javascript function. I'm trying to set up a submit button so that when clicked it will trigger the applet to run on that page. Here is what i have so far:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function submit()
{
document.write("Parsing Java program......."
//initialise Applet here??!!
document.write('<APPLET CODE = "blah.class">')
}
//-->
</SCRIPT>
<DIV ID = "second">
<FORM>
<CENTER><B>Click submit to run the parser on your chosen Java program <BR>
<INPUT TYPE = "SUBMIT" VALUE = "SUBMIT" onClick = "submit()"></B></CENTER>
</FORM>
</DIV>
<BR><BR>
Will this approach work?? Also is it possible to do this if the program running in the applet takes another program as input?? i.e. the user browses for a java program in their directory, and then clicking submit triggers the running of the applet program based on that input program???
using the <PARAM TYPE> tag??
Any help would be appreciated.
Thanks a lot.