agarwal_achhnera
agarwal_achhnera

Reputation: 2456

applet does not work on chrome

Hi I am using below code in asp file for applet, but applet does not load in google chrome while it is working fine in Internet Explorer.

<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="1100" height="500" hspace="0" vspace="0" align="middle" name="graph" 
     codebase="http://java.sun.com/update/1.6.0/jinstall-6u31-windows-i586.cab#Version=6,0,0,5"
     id=JavaBeansBridge_Object1>

     <PARAM NAME ="CODE" VALUE="com.test.Graph" >
     <PARAM NAME ="CODEBASE" VALUE="/test/applet/" >
     <PARAM NAME ="ARCHIVE" VALUE="graphing.jar">
     <param name="GraphType" value="<%= GraphType%>">
     <% if GraphType = "1" then %>
         <param name="GraphTitle" value="Monthly">
     <% else %>
         <param name="GraphTitle" value="Daily">
     <%end if %>
    <param name = "type" value = "application/x-java-applet;version=1.6">
</object>

I test other applet web sites in my chrome they work, although require update plugin but when I click on run this time then applet work. But my applet does not work while work in IE

Please tell me where is the problem

Upvotes: 1

Views: 3151

Answers (1)

Andrew Mao
Andrew Mao

Reputation: 36940

It seems like you are using ERB; can you post the raw output? Perhaps there is a formatting error.

Also, check out the Java deployment advice. In particular, instead of doing things in HTML, try using the deployJava.js script. This script will also check that the browser is compatible and that the JRE is available.

<script src="http://www.java.com/js/deployJava.js"></script>
<script>
    var attributes = {codebase:'/test/applet/',
                      code:'com.test.Graph',
                      archive:'graphing.jar',
                      width:1100, height:500} ;
    var parameters = { ... your application parameters } ;
    var version = '1.6' ;
    deployJava.runApplet(attributes, parameters, version);
</script>

Upvotes: 4

Related Questions