how can I open Applet by pushing button on html

I want to open an applet form html page when The user push
a button(and only then) and i want that the applet will open in
the context of the current page(where the butto is) and will not
start new window (the applet got her own window ).
I know to do it only by opening new html (in java script)
but i want to know how to do it without new html and without
reloading the current html.
Who is Participating?
HolySpiritConnect With a Mentor Commented:
I think u can use the following method :

<script language = "JavaScript">
function openApplet()
     document.body.insertAdjacentHTML("BeforeEnd (or) AfterBegin", "<applet ... > = Code of JavaScript u want to load")


<input type = "button" onClick = "openApplet()">


ataliAuthor Commented:
Thanks, it works in internet explorer but not in netscape, can you know how to do it in netscape to?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.