Pass variables from java to javascript -
i'm new javascript programming, , have question not find answer anywhere.
i have code in java stuff 2 double arrays
double[] arrx = new double[sizea]; double[] arry = new double[sizeb];
then, need pass these 2 variables html/javascript code need use them.
is possible?
would recommend following:
install apached tomcat http://tomcat.apache.org/tomcat-6.0-doc/appdev/
try hello world example included in apached tomcat http://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/
you find values in variables shown in gui.
next step assigning java variables javascript variables, use following syntax
<script type="text/javascript"> var jsvariable =<%javavariable%>; </script>
hoping helps.
cheers !!
Comments
Post a Comment