I have an Applet program, which works fine in Eclipse. I want to load this applet when I click on a button action from a html code. I have kept the html file in the same path where I have this applet class. I am just testing now, so haven't hosted this html file in server, before that I want to test this is working.

I searched forums and trying like below, but I couldn't get it working as expected. Applet is not launching on click button event. I am missing something, could someone guide me to make this working?

```
<HTML>
<HEAD>
    <TITLE> Welcome on board! </TITLE>
    <script>
        function loadApplet()
        {
            var appletbox=document.getElementById('MyApplet.class');

        }
    </script>
</HEAD>
<BODY>
    <p>Click here for new Applet session!</p>
    <button onclick="loadApplet">Click here</button>

</BODY>

```