Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Javascript Java Applet
I want to call an applet in a jsp through javascript as a popup.

i want that the applet should come as pop up and then after completing its task it should close automatically.

This is the code i'm using right now but it starts the applet as a plugin.
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    <script type="text/javascript" src="deployjava.js" ></script>
        function showApplet()
            var attributes = {code:'websample.WebcamApplet.class',
                archive:'websample.jar,core.jar, javacv.jar, javase.jar, jna.jar',
                width:640, height:480} ;
            var parameters = {fontSize:100} ;
            var version = '1.6' ;
            deployJava.runApplet(attributes, parameters, version);
        var searchPic;
        searchPic = new Image();
        searchPic.src = &quot;E:/file.bmp&quot;;
    &lt;input type=&quot;button&quot;  align=&quot;center&quot; onclick=&quot;javascript:showApplet()&quot; value=&quot;Show&quot; &gt;
    &lt;img  id=&quot;0&quot; height=&quot;480&quot; width=&quot;640&quot;&gt;

Posted 30-Oct-12 21:19pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you can use simple applet tag to call an applet

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 455
1 Sergey Alexandrovich Kryukov 445
2 Maciej Los 290
3 ProgramFOX 275
4 CHill60 225
0 OriginalGriff 550
1 Sergey Alexandrovich Kryukov 470
2 Maciej Los 310
3 ProgramFOX 275
4 Peter Leow 250

Advertise | Privacy | Mobile
Web01 | 2.8.150331.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100