value passing in java applet
i am passing value in java applet but value is coming there as null
my javascript for applet deployment :
<script src="javascript/deployJava.js"></script>
<script>
var attributes = { id:'dynamictreeapplet', code:'jstojava.com.vaannila.utility.dynamicTreeApplet.class',width:1000,height:1000} ;
var parameters = {jnlp_href:'./appletjars/a.jnlp'} ;
deployJava.runApplet(attributes, parameters, '1.6');
</script>
My jnlp
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/docRuleToolProtocol/appletjars/" href="a.jnlp">
<information>
<title>dynamictree&l开发者_高级运维t;/title>
<vendor>Ashutosh</vendor>
</information>
<resources>
<j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se" />
<jar href="dynamictree.jar" main="true" />
<jar href="prefuse.jar" main="true" />
</resources>
javascript to pass value :
function showSelected(value){
alert("the value given from"+value);
var diseasename=value;
alert(diseasename);
dynamictreeapplet.dieasenameencode=diseasename;
}
<applet-desc name="dynamictree" main-class="com.vaannila.utility.dynamicTreeApplet" width="500" height="500">
</applet-desc>
</jnlp>
Change
dynamictreeapplet.dieasenameencode=diseasename;
to
document.dynamictreeapplet.dieasenameencode=diseasename;
and probably dieasenameencode to diseasenameencode .
精彩评论