lee_lee07770
New member
I created a Java applet to send email. I have an HTML page the contains the appropriate applet tag and parameters. When I launch the html page, everything runs perfectly! But now I want to change the HTML page to run the applet only on a button onclick...not when the page is loaded. I thought that if I specified a DIV container in the page and then set the innerHTML in the script section to the applet tag and parameters it would work, but it does not.
So basically I have a div tag id="appletDIV"
and a button whose onclick=:"runAppletEvent():
and then in runAppletEvent()
{
//I have for example
document.getElementById('appletDIV').innerHTML = "<applet ...etcc...parameters...etc...></applet>"
}
But this does not work!?! Any ideas on how I could go about doing this?
So basically I have a div tag id="appletDIV"
and a button whose onclick=:"runAppletEvent():
and then in runAppletEvent()
{
//I have for example
document.getElementById('appletDIV').innerHTML = "<applet ...etcc...parameters...etc...></applet>"
}
But this does not work!?! Any ideas on how I could go about doing this?